Interacting Dynamically with Portfolio Level Equity
Author: richard1000
Creation Date: 4/2/2012 4:13 PM
profile picture

richard1000

#1
I copied and ran the first donor strategy as shown in the Wiki page: http://www2.wealth-lab.com/WL5Wiki/kbInteractingWithPortfolioEquity.ashx

I ran it on Dow 30 stocks for last 400 bars. The portfolio equity is displayed if tested on Daily scale but an error is shown when tested on interday scale (eg 60 min scale). A message of "Runtime error: Object reference not set to an instance of an object" is shown.

Is there a way to show interday equity curve?
profile picture

Eugene

#2
Although it's amazing how much support does this unsupported workaround keeps generating, but at least that means it's still quite popular. However, there's a turnkey solution called Trading the Equity Curve PosSizer that requires no coding.
profile picture

richard1000

#3
Given a trading strategy and a position sizing strategy (no not the Trading the Equity Curve PosSizer), I am trying to visualize the change in equity curve as it happens, if possible in realtime.

I know WL is a systems trading software and equity curve CAN be used for trading signals/position sizing but I am not interested in trading using the equity curve. Instead, since no system is foolproof, I am trying to add a discretionary element to decide if all trades should be exited on an emergency basis. A realtime equity curve would help towards this end.
profile picture

Eugene

#4
Try clearing Wealth-Lab's global memory before running on the same DataSet (even if the data is then compressed).

Try restarting Wealth-Lab and executing the sample code right on the intraday DataSet. Did this work?
profile picture

richard1000

#5
I restarted WL and executed on the intraday data. The equity curve is shown but only if I choose the first symbol in the data set, otherwise, I get an error as stated above. Perhaps that was my original problem. I needed to choose first symbol to display the equity curve.

All the intraday scales work except at 60 Minute. I get an error "Cannot covert 60 Minute Bars to 30 Minute Bars". Any work around for this?

To clear global memory, use ClearGlobals() at the beginning of the program right?
profile picture

Eugene

#6
1 - That's right, the first symbol of a DataSet has to be chosen to display the equity curve. It's not a limitation, just the way the Wiki demo strategy was coded.

2 - Make sure that your 60 minute scale DataSet is up to date and you're not using on demand data.

3 - Right, but there's little point in calling ClearGlobals() on every run of this Strategy, as it defeats the purpose of the caching.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).