- ago
Is there a way to run a daily test that would provide the results of a single indicator, in this case Momentum, for multiple strategies simultaneously? I would like to track the results daily to see if there's any correlation between the momentum indicator of multiple sector ETFs and the S&P.

edit: it could be simply for multiple positions, not necessarily multiple strategies. The key would be to get the indicator value for each position on each day.
0
125
3 Replies

Reply

Bookmark

Sort
Cone8
 ( 15.37% )
- ago
#1
Momentum of a strategy? The equity curve? and ETFs and indices? Provide how?

Any strategy automatically shows the last value of plotted indicators in the By Symbol visualizer, which you can copy/paste to Excel.
0
- ago
#2
Momentum indicator within the strategy, using a 10-day period.

The By Symbol tab does show the momentum for each strategy but not in a Meta strategy running multiple strategies.

I found the formula, it's pretty simple, so I think it's going to be easier just to model this in an excel file.
0
- ago
#3
QUOTE:
The By Symbol tab does show the momentum for each strategy ...

By Symbol shows the momentum for one specific strategy.

My thinking would be to use the StreamWriter Append method to have each strategy automatically append its symbol momentum information to a common *.csv file that can be imported into a stat package or Excel. The bad news is that each strategy is going to have to open, append, then close, the *.csv file independently; not very efficient, but easy to implement with the StreamWriter Append method. The OS will automatically handle file mutual exclusion for you in a multithreaded strategy environment.

A better method would be to create a WL SetGlobal()/GetGlobal() StringBuilder object that the MyStrategy constructor for each strategy involved would "declare" and access. Then each strategy could use the StringBuilder Append method to tack on its own information. Finally, you need a simple strategy to read the accumulated StringBuilder object (via GetGlobal) and output it ... say to the Windows Clipboard as a *.csv file that Excel can read. If you're working in a multithreaded strategy environment, then you need to substitute StringBuilder for a thread-safe datatype (such as a FIFO queue or spooler service).

I wish the Windows Clipboard had an Append method, but it doesn't. Perhaps someone on a Windows developer forum (https://stackoverflow.com/questions/522362/concatenating-to-clipboard) knows of an open source StreamWriter solution that can read, append, then write to the Clipboard, which would greatly simplify your task.
0

Reply

Bookmark

Sort