This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
For Free - No Credit Card Required
Historical trading volatility-based system to adjust trade sizes
Another popular position sizing system, often using in trading, is the one that uses volatility to adjust the number of shares to buy or short for stocks, FOREX currencies, options or futures contracts.
This technique has several variations; each one has its own volatility rule that will be used to determine the size of each trade. The current script analyzes and calculates the volatility of the security you are about to buy/short and update the number of shares according to this volatility. The 10 day standard deviation is used to calculate the volatility.
Here are the different scenarios that can occur during the simulation/backtest of your trading strategy:
First, the ratio of the historical volatility to the current trading volatility is calculated.
- If this ratio is lower than one then buy or short (1 - Ratio) in percentage the amount of the initial trade size
- If this ratio is between one and two then buy or short the amount of the initial trade size multiplied by the ratio (Expressed in Percentage)
- If this ratio is higher or equal to two then buy or short two times the amount of the initial trade size
The initial trade size is calculated by taking the total current equity of your trading system and dividing it by the number of allowed positions or trades.
You can also apply two position sizing systems in backtests. This script will simply modify the size of the positions that were determined by the first position sizing method.
The script currently uses 10 days to calculate the historical trading volatility; you can of course update and optimize this value.