Re: [amibroker] Help fixing ReqLotSize Setting

 

Hello,

Thank you very much for your e-mail.

Dividends don't seem to happen every bar, so they can be better served
by GetExtraData call.
By implementing GetExtraData function in the plugin you can serve any
extra data you wish and you are not limited by number of fields in quotation structure.

Best regards,
Tomasz Janeczko
amibroker.com

On 2016-06-30 00:46, Richard Dale richard@premiumdata.net [amibroker] wrote:
Unfortunately we're out of fields.
For stocks, we use Aux1 for turnover (i.e. $ amount traded for the day) and Aux2 for dividends.

We had to use OpenInterest for the original unadjusted closing price since the other two fields require their own aggregation modes (for weekly/monthly etc. periodicities).

Best regards,
Richard Dale.
Norgate Data
- Premium quality Stock, Futures and Foreign Exchange Data -
www.norgatedata.com

On Wed, Jun 29, 2016 at 5:27 PM, Tomasz Janeczko groups@amibroker.com [amibroker] <amibroker@yahoogroups.com> wrote:
 

Richard,

Just one suggestion:  please do not use "Open Interest" field for things other than open interest,
unless there is really no other place to store it.

There are two general purpose auxiliary fields (Aux1 and Aux2) that data vendors can use
for extra data. Please use them instead.

Best regards,
Tomasz Janeczko
amibroker.com

On 2016-06-29 03:13, Richard Dale richard@premiumdata.net [amibroker] wrote:
Sorry I didn't see the discussion on this earlier.

Our current released products ("Premium Data") default to RoundLotSize of 0 for stocks.  

Our PDU test environment set to 1, but this clearly is not applicable to Genta Inc which delisted in September 2011, which has undergone 5 reverse splits for a combined historical dilution factor of 15000000!  It certainly has been a fall from grace with this stock that was in the Russell 3000 for 10 years of 20 year history.

Future versions will have RoundLotSize set to 0 to avoid this issue.  

This will introduce a slight side effect where your position sizes will be fractional and new buy signals may be introduced that would actually be able to executed.The only solution here that I can think of is to use a Custom BackTester that uses the "Open Interest" field to accurately determine fractional size.  We store the original unadjusted close price in that field (for stocks).  

For example, with GNTA-201109, let's say an entry was signalled on 20020122.
Position Size: $10000
Close (adjusted): $19800000
Open Interest (unadjusted close): $13.2
(Unadjusted) Position size would be int (10000/13.2) = int (757.5758) = 757 shares.
Fractional (adjusted) price positios size would be 757 * 13.2 / 19800000 = 0.000504667 shares

For most stocks such a change would have negligible impact on your trading system, but there are certain stocks that your trading system may never be able to purchase.  e.g. Berkshire Hathaway prior to the Class B share being available (in 1996).  Let's work through that one:

eg. BRK.A signalled a an entry on 19950105
Position Size: $10000
Close (adjusted) $20500
Open interested (unadjusted close) $20500
Position size = int (10000/20500) = 0
i.e. insufficient position size to even purchase one share.

We have seen a few occasions where a "butterfly" effect occurs based upon one trade changing... if that trade is never entered, sometimes the entire sequence of subsequent trades changes primarily because of capital limitations.  That's a whole different discussion though!

Best regards,
Richard Dale.
Norgate Data
- Premium quality Stock, Futures and Foreign Exchange Data -
www.norgatedata.com




__._,_.___

Posted by: Tomasz Janeczko <groups@amibroker.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (12)

Check out the automatic photo album with 1 photo(s) from this topic.
sys settings reqlotsize.PNG

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon