You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example notebook we learn how to split historical data into training and validation groups in order to identify the optimal parameters without blatantly overfitting.
This is a really helpful example. However, I'm stumped on how to complete the next step and create a holistic walk-forward backtest.
For example, the notebook ends with a plot showing the rolling Sharpe ratio for in-sample and out-of-sample periods, but how can we create a full portfolio object for the entire historical time period with the optimal parameters and evaluate it as a portfolio object?
For example,
use the in_best_index to identify the best parameters for each in_sample period and then apply those params to the out_sample periods. I realize we would first have to set some default params for the first in_sample period, but after that, we could have an entire backtested portfolio using the best walk-forward parameters. I'm just not sure how to string it all together. cc @polakowo
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the following example notebook we learn how to split historical data into training and validation groups in order to identify the optimal parameters without blatantly overfitting.
This is a really helpful example. However, I'm stumped on how to complete the next step and create a holistic walk-forward backtest.
For example, the notebook ends with a plot showing the rolling Sharpe ratio for in-sample and out-of-sample periods, but how can we create a full portfolio object for the entire historical time period with the optimal parameters and evaluate it as a portfolio object?
For example,
use the
in_best_index
to identify the best parameters for eachin_sample
period and then apply those params to theout_sample
periods. I realize we would first have to set some default params for the firstin_sample
period, but after that, we could have an entire backtested portfolio using the best walk-forward parameters. I'm just not sure how to string it all together. cc @polakowowfo_optimal_pf.stats()
wfo_optimal_pf.plot().show()
Beta Was this translation helpful? Give feedback.
All reactions