SmartQuant Discussion

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

All times are UTC + 3 hours




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Aug 24, 2012 6:13 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Hi, I've just started using PATS API and encountered a problem. I created a instrument "mini S&P" with maturity set to "2012-12-21" and exchange set to "CME", then I subscribe market data and get the following error:

Code:
Contract Exchange/Name/Date unknown


Then I checked the API log message and found the subscribe message:

Code:
ptSubscribePrice CME\MINI S&P\


compared to the log generated by the C# DEMO provided by PATS, which can sucessfully subcribe to market data:

Code:
ptSubscribePrice CME\mini S&P\DEC07


it seems that the maturity information is not sent in ptSubscribePrice method. Is there something wrong with my settings?


Top
 Profile  
 
PostPosted: Fri Aug 24, 2012 7:52 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
Have you created future or stock instrument?

Regards,
Anton


Top
 Profile  
 
PostPosted: Sat Aug 25, 2012 4:44 am 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Hi, Dr. Fokin, i created futures, not stocks.

Here's the property window:

Image

Here's the provider error:
Image


Top
 Profile  
 
PostPosted: Mon Aug 27, 2012 1:36 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Yes, you are right, maturity information is not used to detect contract on broker side.
I recommend do not manually create instruments for PATS, but download them using appropriate wizard (Data->Import->Instruments)

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Mon Aug 27, 2012 2:59 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Thanks, Kurov. I followed your advice and succeeded downloading market data. Instrument symbols imported from PATS look like "name + (space) + MMMdd" format that contains maturity info. So they are not compatible with IB symbol (no maturity info), that means now I have two "instruments" for each contract.


Top
 Profile  
 
PostPosted: Mon Aug 27, 2012 3:47 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
You are able to change symbol of such instruments personally for IB - just add AltSource=IB and set AltSymbol property to correct value.

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Mon Aug 27, 2012 4:45 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Thanks a lot, Kurov. Just one more question: I was just trying to check BrokerInfo on PATS API, and could not get any data on Broker Info panel. I found a similar thread on the forum:

http://www.smartquant.com/forums/viewtopic.php?f=41&t=7952&hilit=broker+info+pats

It seems that I have the same problem with this user.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 12:37 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Still puzzled with BrokerInfo problem. I'm doing PATS conformance test so i'm desparate for help!


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 1:00 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

PATS plugin does not provide broker info because there is no such functionality in their API.

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 2:11 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Thanks for the reply, Kurov.
So is there a way to know my open position in OpenQuant?

I've just read the PATS API document, and found a method called "ptGetOpenPosition" which can return the current position of a given trader, and a method called "ptBuyingPowerRemaining" to get the remaining buying power of a trader.

So I think these two methods could be used to get brokerInfo in OpenQuant. Are there any other problems preventing the implementation of brokerInfo?


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 2:20 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

These methods were introduced in API after our PATS plugin had been developed and certified (some years ago).

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 2:37 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Understood.
So any plan to update the PATS plugin? So it could be a more complete API? Currently, without the ability to query current position/bp/pnl, the plugin could only be used as a data recorder :(


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 4:10 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
Why can't you use it as execution provider without getting broker info? Also, we have passed PATS certification, so I don't think you need to pass it again...


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 4:17 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Thanks for the reply, Dr.Anton.

My new futures broker told me that if I wish to use PATS api, I have to apply for the conformance test and pay $1500 test fee. :(

I do wish to use PATS as an execution broker, and all I need for brokerInfo is current open position. I can't keep OpenQuant running 24/7 so if, for any reason, I closed and restarted OpenQuant, I need to know my open position when I restart and reconnect to PATS.


Top
 Profile  
 
PostPosted: Thu Aug 30, 2012 4:31 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6816
We've already paid $1500 for PATS conformance...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

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