The Initialize method is called first. Override this method to instantiate indicators or other objects you will need during your model's processing.
The Execute method is called once for each bar of data in the history. Override this method to implement your model's trading logic. You are passed the current index into the historical data in the idx parameter.
The idea behind this model is an investment for the retirement capital and to ensure to be out of the market during bear markets. In addition, the system is suitable for persons who have never dealt with the stock exchanges before. It can also be used as a Market Timing model on a higher time scale. Profits can be leveraged by using the ProShares Ultra SSO ETF (doubles returns of the S&P 500 for a single day using stocks/derivatives), but a slightly larger draw down must be considered. Back tests since 1978 on the S&P 500 Index have shown very impressive results with a similarly low draw down.
You will need to Sign In in order to save your Models.
When saving a Model, provide a short and descriptive name that summarizes its spirit.
Also, provide a brief description that explains the logic of your Model, and any other interesting background material you'd like to include.
When you're ready, please Publish your Model so other members of the Quantacula community can review and learn from it.
Remember, in the free membership, you can save only 3 non-published Models. Publish a Model to open up one of your free Model slots. Premium members can save an unlimited number of private Models.
The settings here control what data is used when you backtest your Model, as well as the position sizing. Settings information is saved when you save your Model.
|Maximum Drawdown %|
|Maximum Drawdown Date|
|Interest and Commission||Model||Benchmark|
|Cash Interest Earned|
|Margin Interest Paid|
|Number of Positions|
|Number of NSF Positions (not taken)|
|Average Profit %|
|Average Hold Time (Bars)|
|Number of Winners|
|Winners Avg Profit|
|Winners Avg Profit %|
|Winners Avg Hold Time (Bars)|
|Number of Losers|
|Losers Avg Loss|
|Losers Avg Loss %|
|Losers Avg Hold Time (Bars)|
|Position||Symbol||Quantity||Entry Date||Entry Price||Last Price||Profit||Profit %|
|Position||Symbol||Quantity||Entry Date||Entry Price||Exit Date||Exit Price||Profit||Profit %|