SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Fri Nov 24, 2017 1:26 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Sep 24, 2012 3:39 pm 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
I've just found that when an order is partially filled and OnOrderPartiallyFilled event is fired, Position.Qty does not change at all, UNTIL OnOrderFilled event is fired. This could lead to disasters sometimes.

My solution to this problem is to manually create a variable (e.g. myPosition) and change it when OnOrderPartiallyFilled/OnOrderFilled event is fired. But I do hope Strategy.Position.Qty field could sync with actual position.


Top
 Profile  
 
PostPosted: Tue Sep 25, 2012 11:10 am 
Offline

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

yes, this is true and this issue has been discussed several times on this forum. The thing is that initially we had an idea to split order propagation chain into two layers. One, low layer, deals with execution reports and orders, and consequantly operates with partial fills and order quantities. The other, transaction and portfolio position layer, deals with transactions, which represent complete order fills. We though that such structure would simplify startegy development. Actually it does simplify strategy development (so that most of time you simply write HasPosition in your strategy entry and exit code and don't bother with partial positions/fills tracking) but on the other hand it turns out that this might lead to some sort of confusion that you've described in your post.

We will try to imporve this concept in a new version of the framework.

Cheers,
Anton


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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