Hi. On my Equity Curve, it looks like trades are starting later than I'd like.
So it seems like my Performance data will not include the full Date Range that I'm looking for, because the early dates will not include any trades.
Is there something I can do to fix this?
I'm using a simple Fast MA crosses Slow MA to enter and exit a Long-Only strategy.
I realize that the Moving Averages need time to fill (or stabilize for EMA). I use GetTradingLoopStartBar(x), where I've tried x = 1 up to x = 190. I have plenty of data before my Date Range of Interest.
But it seems like the Equity Curve, doesn't move, and there is still a "dead period" at the beginning of my Equit Curve. I can provide pictures if you would like. Any advice would be appreciated.
Best regards,
Robert
Size:
Color:
Size:
Color:
Eugene,
Thank you for the link. That explains it. (still looking through the Users Guide).
Do you have any idea what Wycan did?
where he states in his 2/5/2009 post,
" I've added my own datarange component which I include in all my scripts that keep the testing within the stated timeframe. "
Size:
Color:
Not sure, but a customer's suggestion about adding an option to start the Buy & Hold equity on the date of the first trade is in the works for 6.1 next year. It's not exactly "Lead Bars", but it's close without all complexity associated with it.
Size:
Color:
Hi, I've been away for a while, but getting back into WLP.
I'm wondering if this:
QUOTE:
... customer's suggestion about adding an option to start the Buy & Hold equity on the date of the first trade is in the works for 6.1 next year
was ever implemented.
I'm using 200 day SMAs & EMAs, and since there no trades taken in the first 200 days (during the MA seed time), it throws-off all of the performance metrics reported for the backtest.
Any advice or work arounds would be helpful, which would start the performance measurement (and the equity curve) after the 200 day seed time.
Best regards,
Size:
Color:
Unfortunately, it was not implemented in 6.3.
Size:
Color:
Right, the plans on implementing that option changed - it's a good example for us not to talk about enhancements that we "think" will be implemented in the next build.
Work around:
It didn't occur to me until just now, but we could create a special Performance Visualizer for Portfolio Simulations that:
1. Started Buy & Hold metrics from the first trade date, and,
2. Calculated Portfolio metrics starting from that same date.
I would prefer to an option for this in the standard Performance visualizer, but if that's not going to happen, there's a potential solution.
Size:
Color:
Good idea Robert. In the visualizer it basically takes changing the bar 0 to bar X, where X = the first trade's inception bar. Sounds like it has a chance to work out.
Size:
Color:
That would be excellent.
Do you think you guys (or some enterprising Community Visualizer person) will do this? Or should I (yikes!) start looking at API documentation, in hopes of writing this (these) myself?
Thanks for the good answers.
Size:
Color:
One more thought.
If you guys are going to do this work, then I think it would be best to allow a user defined "Time Offset" to start Performance Calculations, rather than using the first trade date to start. Since, if I use a 200 day SMA, I just need the offset to be 200 days, but I might not get an Alert (buy/short signal) on Day 200, but I'd still like the Performance Calculations to begin on day 200, not necessarily on the first trade date, which might be way later than 200 days.
Best regards
Size:
Color:
It would be optimal (and no impact on other code) if the standard Performance tab included that option to start B&H from the first trade date. Robert, are you considering to file a formal request first?
Size:
Color:
It's already out there, but 6.4 will be primarily another maintenance release anyway (unless we get some "other" project integration added). I think it's "safe" for you to take this bull by the horns :)
Size:
Color:
Another maintenance release sounds good... if only that would allow Fidelity to materialize one of the most demanded items -- switching to .NET 4.0.
Size:
Color:
The more I think of it, the more complex the task seems. And of course it's not nearly the matter of only "changing the bar 0 to bar X, where X = the first trade's inception bar". Various other concerns aside, at the very least it would take some rebuilding the SystemPerformance with associated SystemResults objects passed to the visualizer by Wealth-Lab. Simply put, we need the visualizer to calculate a brand new Buy&Hold Equity/CashCurve and other metrics.
Size:
Color:
Hi Eugene,
Yes, it looks like you have a good grasp of the "problem" (or feature :-). It's not just the equity curve, it's also all of the SystemPerformance results. That's why it would be a pain if I had to re-calculate all of the SystemPerformance results by hand, to remove the unwanted indicator_stabilization_time. This would be a tedious (error prone) job, best left to a computer.
Thanks very much for giving this more thought.
Best regards, Robert
Size:
Color:
The devil is always in the details and Eugene is the expert (that's not to say that Eugene is a devil - quite the opposite!) but only a few of the metrics have to be recalculated for the Portfolio performance: Exposure, Annualized Gain %, and Sharpe Ratio. None of the others in the main performance visualizer are affected by the starting date.
Size:
Color:
Hi Robert,
The idea is that Wealth-Lab passes a SystemPerformance object to a performance visualizer, this collection includes four SystemResults objects containing the performance of L+S, Long, Short, and B&H. Wealth-Lab builds those result sets, our visualizers "massage" this data according to the various formulas like Sharpe Ratio. It's not a problem to recalculate any performance metric - there's an "engine" delivering them to visualizers and scorecards, but you must pass a SystemPerformance object. The key (and robert-9876 just confirmed) is that we need to rebuild that object, and I'm not exactly sure in detail what has to be done.
Size:
Color:
Deferred. :(
Size:
Color:
Hi Eugene, Thanks for letting me know. I will investigate my plan B. (ie writing my own custom visualizer (yikes)). I'll also stay-tuned, in case something unexpected presents itself. Best regards.
Size:
Color:
Looks like that in a future version (not 2012.07) of MS123 Visualizers, I'm going to eliminate the "flat line" (or at least make that optional) i.e. the equity curve will start from the date of the first trade rather than the first bar.
Note: the aforementioned does not apply to the built-in visualizers; only to our MS123 Visualizers library.
Size:
Color:
QUOTE:
Looks like that in a future version (not 2012.07) of MS123 Visualizers, I'm going to eliminate the "flat line" (or at least make that optional) i.e. the equity curve will start from the date of the first trade rather than the first bar.
The flat line has been eliminated:
NEW MS123 Performance Visualizers and MS123 Scorecard
Size:
Color:
Hi Eugene, I've been distracted with other things lately, but this is great news (for me any way). I'll chck it out. Thank you very much for this.
Size:
Color:
The results in the post run analytics windows are just wrong minded.
One is interested primarily in strategy performance, secondarily in performance to a benchmark. Thus the "By Period" results are wrong on every strategy analysis that requires a lookback.
For instance, a highly profitable strategy that has a moving average period of 100 days will show at least that many consecutive days of profitability if someone has coded their GetTradingLoopStartBar.
I am certain that this error in logic extends to ratio calculations as well. None of the ratios under the performance (or performance+) tab are correct although all of them are described as being defined correctly.
This logic fault must have been created on a Monday when everyone was too hungover to think clearly.
Size:
Color:
There is no error and nothing is wrong. Everyone can have their point of view. The design decision was to eliminate the source of various bugs associated with the legacy Lead Bars option, and, provide a more realistic - or even pessimistic - outlook by including the seed bars into the equity curve. What's important, however, is that discussing it is akin to beating a dead horse: nothing will change.
Size:
Color:
OUCH..
My statement was hardly an opinion; it is a plain fact that if one was doing backtesting, return analysis and benchmarking by hand none of us would chose to include out of trade sampled benchmark data in the results.
Why not just require the bars statement and drive everything from there!?
Failure to change and/or admit where things need to be corrected (not YOU Eugene) sound like a plan for failure.
Size:
Color:
Hank,
As Cone said in post 16, it affects a handful of standard performance metrics like Exposure, Annualized Gain (pct), and Sharpe Ratio and probably the by-period figures.
Since the design is not to change, motivated users are welcome to develop a solution. There's no laid plan, but for hints on what effort it may take you can look in my post 14 (and related posts above). I admit it's nowhere near a simple task, but a theoretical possibility is still there.
Size:
Color:
Has there been any progress in adjusting the start date for the BUY & HOLD equity curve?
I have the same concern and it is now AUG 1 2015.
Also, when using a dual moving average strategy, is it possible to initiate a trade if the fast MA is above the Slow MA for the first trade only? The balance of the trades are, of course, controlled by cross-over's.
Thanks Jim K
Size:
Color:
As stated before, the design is not to change. However, newer
GetAllDataForSymbol method in Community Components is the solution. Using this technique, you can create indicators that are valid from bar 0, and therefore can start the trading loop at bar 1.
Size:
Color: