SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Oct 24, 2020 2:42 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Sep 09, 2011 4:50 pm 
Offline

Joined: Mon Mar 09, 2009 3:49 pm
Posts: 42
My strategy holds various markets (50). I would like to create equity curves of each market individually to see which market contributed to the performance.
However I fail using the PnL methods as they are reseted when a position is closed. Cumulating the pnl in the OnBar event fails as well as the event is triggered every day the amount of markets in my portfolio. Any suggestions are most welcome. One way of doing that would be using a dictionary.
Bill


Top
 Profile  
 
PostPosted: Sat Sep 10, 2011 9:37 am 
Offline

Joined: Wed Aug 24, 2011 7:11 pm
Posts: 42
Hi Bill,

Im not sure if this is possible with OpenQuant, but what I'm doing is writing a library to interface with my strategies. One of the functions is LogTrade() - which pushes the trade details out to disk. Then I can do the PnL calculation but separately.

Possibly not so helpful, but its just a suggestion that using c# we can think "outside the box"


Top
 Profile  
 
PostPosted: Tue Sep 13, 2011 4:56 pm 
Offline

Joined: Mon Mar 09, 2009 3:49 pm
Posts: 42
thank you aburnettthompson,

I did something similar to what you suggested. However in a multi market portfolio I need to make sure I get the same amount of datapoints for all markets.
In addition I need to add other stats stuff costs OQ does not support. We're building an external library that supports highwatermark and performance fee simulations;-)

bill


Top
 Profile  
 
PostPosted: Tue Sep 13, 2011 5:28 pm 
Offline

Joined: Wed Oct 08, 2003 1:06 pm
Posts: 833
Hi,

Unfortunately there is no simple way to see Equity and other statistics per instrument in OQ. You should do it in your strategy code and developing of an external library is a good idea.

The only trick I can suggest is to use scenario.cs to see statistics per instrument (if your strategy logic doesn't use pair trading, spread trading etc.). In scenario.cs you can load all instruments your solution is using in a list, then run your project for each instrument in this list separately and print/save statistics at the end of each run if required. Please take a look at these threads to see how to use scenario.cs:
http://www.smartquant.com/forums/viewtopic.php?f=64&t=8627
http://www.smartquant.com/forums/viewtopic.php?f=64&t=8636

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Tue Sep 27, 2011 3:53 pm 
Offline

Joined: Mon Mar 09, 2009 3:49 pm
Posts: 42
Hi Sergey

Thank you very much for the addition.
However I found a "potential" bug. When you run the strategy with the FillOnBarMode NextBarOpen you get multiple entries with the same date in the MetaPortfolio EquitySeries.
Is this supposed to be like that?

Thanks, bill


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group