Click here to Login





                                                   Simulation by Year

  0

0
Dave W.
2013-11-27 01:06:38


This may be answered somewhere, but I didn't find anything with a few searches.

I want to be able to get simulator results for a single year at a time. So I thought I could just use the following simulator optimization code to do that:

Optimize("StartYear", 2006, 2011, 1);
SetSimPeriods(StartYear, 1, 1, StartYear, 12, 31);

When I run the above code as part of my simulation, the system only produces results for 2006 even though the optimizer variable says it is producing output for 2006, 2007, 2008, etc. In other words, all results are for 2006 even though they have a different year label on the optimization output.

Is there an easy fix? Or is there another easy way to achieve what I'm looking to do?

Thank you.



QuantShare
2013-11-30 11:08:19

  0

Best Answer
Parameters in the "SetSimPeriods" function cannot be optimized.

You can for example do the following:

Optimize("StartYear", 2006, 2011, 1);
buy = yourrules and year() >= StartYear;




Dave W.
2013-11-30 19:24:31

  0

Great. That works just as well. Thanks.


No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Output metric for each trading year
Year to Date Excess Return
Short Cover Simulation Indicator
Vary the Start Date of a Trading System Simulation
Benchmark Return in a Trading System Simulation

How-to Lessons
How to add a metric in the trading system simulation report
How to create a Monte Carlo simulation
How to debug a trading system using the money management tool
How to use QuantShare with Metastock data
How to add custom position-based metrics to your trading system

Related Forum Threads
Unexpected behavior in Simulation module
Weekly Simulation
Option simulation
EOD simulation but intraday stops and targets??
handle stock split during simulation if close price as filter

Blog Posts
True portfolio simulation applied to trading systems
How to build and backtest a robust stock trading system
Backtesting a Strategy Based on Bond and Stock Index ETFs
QuantShare Trading Software: New Features in the 3.6.0 Version
How To Create and Backtest an S&P 500 Trend Following System









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.