question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Ranges Variable and Walk Forward Optimization

See original GitHub issue

To Whom It May Concern,

I see in https://github.com/jmrichardson/tuneta/blob/main/examples/tune_all.py, that you are tuning all indicator over a period of 10 years of daily data given the next day’s returns. What does ranges=[(2, 30)] do in this instance? I see that ranges is defined here, https://github.com/jmrichardson/tuneta/blob/main/tuneta/tune_ta.py#L44. It specifies that it is a parameter search space. It appears to be used to define a low and high here, https://github.com/jmrichardson/tuneta/blob/main/tuneta/tune_ta.py#L82, which then appears to be used as a parameter in an Optuna trial here, https://github.com/jmrichardson/tuneta/blob/main/tuneta/tune_ta.py#L125. Unfortunately, it’s still not clear to me what this parameter does. My apologies for my ignorance.

I’m using pandas-ta on minute data. So, I need to adjust the default setting for most of indicators I’m using. I had hope to use this library to get these settings using a walk forward optimization strategy, which ensures that I’m not overfitting my data and/or getting stuck in a local minima. Just for completeness as I wasn’t aware of this a few months back, but a walk forward optimization is defined here, https://en.wikipedia.org/wiki/Walk_forward_optimization and https://www.youtube.com/watch?v=GowmmrSMw9I, and shown in code https://github.com/polakowo/vectorbt/blob/master/examples/WalkForwardOptimization.ipynb on VectorBT, as well as visualized here, http://www.adaptivetradingsystems.com/blog/modeling_sofware/walk-forward-simulations-in-synergy/.

Is it possible to use tuneta to adjust the setting for pandas-ta indicators in this way. If not, could we discuss how to make this possible?

Thanks for the hard work on this library, as well as your time and attention to this matter. I hope that this message finds you well and that you have a great week. God bless.

Very Respectfully, CMobley7

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
CMobley7commented, May 11, 2022

@jmrichardson , thanks again for your quick and thorough responses! I might have some time this upcoming weekend or next to submit a PR for this.

0reactions
jmrichardsoncommented, May 19, 2022

@CMobley7

It looks like @wouldayajustlookatit repo is based on an earlier version prior to a major code update to support different enhancements such as distance correlation, multiple equities, cluster based selection of parameters, etc. Unfortunately, I can’t merge the updates because the code base is significantly different between both. However, if you see any updates that make sense, feel free to add/test them with your PR. Happy to merge any improvements!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Walk Forward Analysis and Optimization (How We Use It in ...
Walk forward analysis is in sample and out of sample testing taken to the next level. In short, it works by dividing the...
Read more >
Walk-Forward Optimization - StrategyQuant
It is a technique in which you optimize the parameter values on a past segment of market data, then verify the performance of...
Read more >
13.2) Avoiding Pitfalls when using Walk Forward Analysis ...
Walk Forward Optimization (sometimes called Walk Forward Analysis ), is often considered the best way to perform algorithmic trading system ...
Read more >
What is a Walk-Forward Optimization and How to Run It?
Walk forward optimisation is a process for testing a trading strategy by finding its optimal trading parameters in a certain time period (called...
Read more >
Walk-forward Optimization - TradingTact
Walk -forward optimization provides a measure of system robustness, and allows adaptation to changing market conditions through periodic reoptimizations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found