I've read several posts recently, scattered across the forum, saying something to the effect that its best to ignore old data due to its lack of relevance to a very different present-day market, and evolving market conditions.
I agree, but my data-obsessed side recoils at the thought of leaving out any data of even minimal relevance. . *so*, I wanted to share a little trick I use to simultaneously make use of all historical data, as well as counting the more recent data much more heavily than the older data, in a linear fashion.
When engaging in backtests or optimizations, you can alter your strategy in the following way:
Standard entry conditions-
{
EnterShort(DefaultQuantity, "");
}
Lastly, add 'tradecounter' to your 'variables' at the top of the strategy:
#region Variables
// Wizard generated variables
private int tradeCounter = 0;
Compile, and you're all set.
What this does is it forces the strategy to take an additional contract for every additional trade as it moves forward in time, because it uses 'tradecount' as a multiple of your entry, to determine how deeply you enter each position. Meaning, if you have 570 historical trades in a given strategy, the very first trade in the historical period will be for a single contract, the second trade will enter two contracts deep, the third trade three contracts deep. . . all the way up to the very latest, and most recent trade, a full 570 contracts deep.
Yes, this makes a few variables untrustworthy (such a gross profit/loss, net profit, etc), but it can be very telling to look at things like Profit Factor and Sharpe Ratio, amongst others. Comparing it directly to the standard, non-'time-weighted' version of the strategy can be enlightening.
Lastly, it allows you to perform optimizations with an extreme emphasis on the most recent period of time, which has proven immensely helpful to me, perhaps it will to someone else as well.
Merry Christmas/New Year, everyone
(the above code snippet is specific to NinjaTrader, although the idea/concept should be able to be employed in most platforms)