I have a strategy that runs on S&P500 stocks and holds 20 positions.
- Would like to optimize the strategy over 6-month period per symbol and then run it in Portfolio Simulation mode (holding only 20 positions) over the next 2 months. Then, repeat the process until i have an out-of-sample equity curve and drawdown curve over 3 years.
- this is like running in-sample in Raw Profit mode (to optimize per symbol, since PortSim doesn't support per-symbol optimization) but running out-of-sample in PortSim mode to achieve an equity curve.
How do i achieve this? The WFO process runs in-sample and out-of-sample in the same mode.
thx
Kiran
Size:
Color:
Size:
Color:
Thanks Eugene for the document,
I read it but didn't find objects to
1) access and update the Mode and Dates in each run (i.e. Raw Profit during in-sample vs Portfolio Simulation in OOS and Start/End Date), so i can alternate between IS and OOS in subsequent runs.
2) access the symbol-specific optimal parameters when running in Raw Profit mode
3) assigning the symbol-specific optimal parameters to the Preferred Values, that would be used in the Next Run (in Port Sim mode).
thanks
Kiran
Size:
Color:
Sounds like you've hit a limitation in the API. In this case, possible suggestion could be to build your custom "optimizer" as a compiled Strategy (like the WFO library by AronowSoftware back in the days of WLP 5.1) or as an addon library (like Neuro-Lab, for example). Through the use of the internal and
unsupported TradingSystemExecutor class a strategy can be executed with arbitrary position sizing and data loading settings. Not sure if you'd be able to assign Preferred Values this way but the whole logic of the "optimizer" is under your complete control.
Like I said it's all unsupported but here's an example to give you a general idea:
Interacting Dynamically with Portfolio Level Equity. Check out the
PortfolioEquityEx.cs class in the Community Components
open source code.
Size:
Color: