Stock Parameters_v4.3.4.9

 

Global Parameter:

Description:

Minimum Stock Volume

This parameter applies only to stocks. It establishes the minimum daily trading volume, in shares, required to enter a stock position. It is based on a 5-day exponential moving average of the volume. This value can be viewed by using the instrument.averageVolume property when using the Builder Edition.

Commission per Trade

This parameter indicates the commission charged on a per trade basis. This type of commission charge is used by some brokers for stock brokerage accounts.

 

Assuming a theoretical Commission per Trade of $5.00; Buying 100 shares of XYZ stock would count as one trade, and selling that same 100 shares would be a second trade, for a total transaction cost of $10.00.

Commission per Stock Share

This parameter indicates the round-trip charge for each stock share traded. This can be used in place of or in addition to the Commission per Trade. For example, assuming a Commission per Contract of $0.02, buying and then selling 1,000 shares of IBM would result in a total transaction cost of ($0.02 per share) x (1,000 contracts) = $20.00. NOTE: Most stock brokerages charge commission for each one-way trade, once for the entry, once for the exit For Trading Blox, use a Commission per Stock Share of double the per share commission charged by your broker for one-way trades.

Commission by Stock Value

Uses a percent of the stock value as the commission amount.

Sell Stock Split Remainder

Convert Profit by Stock Splits

With stocks, when the data is backadjusted for stock splits, the profits made/lost are respectively smaller as the prices get smaller. Take MSFT as an example. The close on Jan 2, 1987 was $47.75, and the close on Feb 2 was $73.00. But your backadjusted data will probably show around $.17 on Jan 2 and $.25 on Feb 2. So if you bought 100 shares at the close on Jan 2 and sold at the close on Feb 3, you would have made $25.25 per share, or $2,525 total. But many simulations would show a profit of just $.08 per share, or $8 total.

 

If you set this parameter to true, Trading Blox will determine that the real profit for this trade was $25.25 per share. Your simulation will then be accurate even though the data has been adjusted.

 

Trading Blox will convert the profit on each trade by the stock split ratio between the trade entry and the trade exit, and it will also convert the volume in the data file back to the real volume amount using the stock split ratio. This volume number is only used for the AverageVolume property, which is used for the Max Percent Volume per Trade and Minimum Stock Volume global parameters. You can also access these properties as instrument.adjustedVolume, and instrument.averageVolume.

 

The stock split ratio is the unadjusted close / close for any given day, so be sure to include the unadjusted close in the data.

 

Create two MFST files in CSI, one with no adjustements, and one with stock split adjustments. If you look at the volume on 2005-01-03 for MSFT using the unadjusted data, you will see that the volume presented is 39,545,600. (Note that there is a volume multiplier of 100 in play here as well, so the number you see is actually 395456.) The stock split ratio on that day is 16, so the actual volume traded was 2,471,600. If you are trading a max percent of the day's volume, then you would want to use the adjusted volume number rather than the unadjusted number that is provided in the data file.

 

Likewise, if you use the example above, you want to make sure the profit on a 100 share trade reflects the actual value of that trade in 'todays' dollars. So Trading Blox converts the profit using the stock split ratio as of the trade entry.

 

In addition, Trading Blox needs to know when the stock split was, in relation to the dividend distribution. So if you purchased 100 shares, the stock had a 2x stock split, and then a $.50/share dividend, that is a different profit than if you purchased 100 shares, the stock had a $.50/share dividend, and then it had a 2x stock split.

 

This is why it's important to keep the stock splits and dividends separate. The stock splits alter the data in a geometric manner, whereas the dividends are simple unadjusted per share amounts. If you try to stuff proportionally adjusted dividend data into a stock split adjusted series, you will get the wrong P&L everytime.

 

So, set your CSI UA to adjust the stock data by stock splits only, be sure to include the unadjusted close, and call CSI to get the unencrypted dividend data so Trading Blox can build those files for you. CSI will provide the unencrypted dividend data to all Trading Blox customers free of charge.

 

 

Earn Dividends

Set to true to account for dividends in the test.

 

The dividend files should be setup in the Dividends folder.

Pay Margin on Stocks

This parameter is for stocks only, and defines whether the system will charge margin for excess cash used when buying stocks. The values used are from the system wide base currency rate files. In the case of USD, the file is the USD_Rates.txt file in the forex data directory. The Borrow Rate is used when accounting for margin.

 

Margin Interest is charged every day when available cash falls below zero.