SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Dec 16, 2019 9:14 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Equity in Sim vs Live
PostPosted: Wed Jul 23, 2014 12:23 pm 
Offline

Joined: Wed Mar 05, 2008 5:03 pm
Posts: 6
I am trying to switch from Sim to Live and have had a hard time understanding how to get the account value. In Sim I have been using Portfolio.GetCoreEquity() and I have seen many references in the forum that indicates it should work. However when I switch to live mode, it returns zero.

I'm using OEC and found out that I can get the equity with the broker info field NetLiquidatingValue. But now I am wondering what other classes and methods I shouldn't use Live.

Should Porfolio.GetCoreEquity() or GetAccountValue(), etc be returning the broker equity when live?


Top
 Profile  
 
PostPosted: Wed Jul 23, 2014 12:30 pm 
Offline

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

no, these methods return core equity and other values for OpenQuant Portfolio, which is built up from execution reports received from a broker in live mode or execution simulator in sim mode.

Usually you get your real account information using BrokerInfo and then add a transaction to OpenQuant portfolio (in OnStrategyStart or elsewhere) to synchronize your real broker account and OpenQuant Portfolio account. Then your OpenQuant portfolio account should be in synch with your broker account, but it's usually a good idea to request BrokerInfo from time to time and chech that you are still in synch.

Regards,
Anton


Top
 Profile  
 
PostPosted: Wed Jul 23, 2014 2:34 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
Just a comment. It would not be very hard to return BrokerInfo account value in Portfolio account methods in live mode but there are two issues:

- different providers use different fields to return account value or buying power information, though this can be unified by adding common GetBuyingPower() method or something like this in all BrokerInfo providers
- your strategy can use a fraction of your total account cash / buying power for a praticular strategy, so that your broker account value and OpenQuant Portfolio Account value for a particular portfolio / strategy can be quite different.

Regards,
Anton


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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:  
cron
Powered by phpBB® Forum Software © phpBB Group