SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Thu Sep 24, 2020 9:25 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Mon Sep 06, 2010 4:41 pm 
Offline

Joined: Mon Mar 09, 2009 3:49 pm
Posts: 42
I have 5 projects in a single strategy.
I'm trying to find a way to net all positions at a given time, preferably using a script.
I know there's the portfolio view, however I would like to do it programatically.
Is this possible?

Thanks
Bill


Top
 Profile  
 
 Post subject: Anybody out there?
PostPosted: Wed Sep 08, 2010 3:44 pm 
Offline

Joined: Mon Mar 09, 2009 3:49 pm
Posts: 42
Anton? Sergey?
Any help is most welcome...
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 09, 2010 4:09 pm 
Offline

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

Portfolios are not accessible "outside" the strategy code, so you can't do it with a script. You should put this logic in every strategy, this way you can get info regarding positions of each single strategy portfolio. Or you want to get positions of the whole solution portfolio?

Regards,
Sergey.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 10, 2010 7:10 pm 
Offline

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

Yes, netting multiple projects within a solution.

Thanks,
Bilgi


Top
 Profile  
 
 Post subject: Sergey????
PostPosted: Wed Sep 15, 2010 12:20 pm 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2010 2:55 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Hi Bill,

what we can do is to add MetaPortfolio property (a reference to solution level portfolio that you can see in the GUI) to Startegy class. Would this help?

Regards,
Anton


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2010 4:23 pm 
Offline

Joined: Mon Mar 09, 2009 3:49 pm
Posts: 42
This would be perfect.
It would also help for other data listed found the portfolio or results tab.
When would you think to add this feature?

Thanks for the respone Anton.

bill


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2010 5:09 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Sergey will be back from vacation on 27th of September. I'll talk to Alex to see if we can add this property earlier.

Regards,
Anton


Top
 Profile  
 
PostPosted: Thu Sep 30, 2010 5:18 pm 
Offline

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

We have added the MetaPortfolio property to the Strategy class in the last release. It gives access to the solution level Portfolio.

Regards,
Sergey.


Top
 Profile  
 
PostPosted: Sun Oct 17, 2010 7:07 pm 
Offline

Joined: Thu Jun 08, 2006 3:56 pm
Posts: 537
Location: BC Canada
I remember I did something similar by recording all of my information in an object that I stored in the global area. Each strategy grabbed and used the object from the global area when it needed to do so. As I recall, since OQ is not multi-threaded, locking was not a problem, and because I defined my own object and methods, I could do anything that I wanted for functions and data structures. It seems to me that the code for storing and retrieving objects from the global space is posted elsewhere on these forums (I seem to remember one of the datatypes needed special casting, and that was the only tricky thing about the whole process.)


Top
 Profile  
 
PostPosted: Thu Nov 18, 2010 7:14 pm 
Offline

Joined: Mon Mar 09, 2009 3:49 pm
Posts: 42
Great Job!
Works just perfect!
Bill


Top
 Profile  
 
PostPosted: Tue Jul 12, 2011 9:50 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Hi,

have you looked through the docs? There is a pretty introductory document discussing strategy development with OpenQuant.

Cheers,
Anton


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Group