The establishment of a real and reliable backtesting can have a certain reference and guidance to the real disk operation, the reason is said "certain", because the backtesting can not fully simulate the real environment, such as the strategy is the closing price to sell, then in the real plate, only the closing moment to know what the closing price is, but also can not be traded. Therefore, to build a reliable backtesting system, we need to take into account all aspects of the problem. Funding
The amount of money in the firm is not unlimited, then in the backtesting, also set a benchmark amount of funds, such as 1 million. All operations must then be carried out within this funding range.
There is also a question of whether compound interest, if it is compounding, is to include the profit portion in the available funds, and if it is not compound interest, the maximum amount of money available is the benchmark amount. disposal of ex-dividend
In addition to the right to ex-dividend, the price of the stock will change, if the stock is a holding stock, then the occurrence of ex-dividend on the day of the number of positions to deal with, the general processing method is: Market value/New stock price = number of shares. time to buy and sell
Buying a stock requires checking the availability of free funds, which can lead to a buy failure if the funds are not enough, so if you have a sell ticket, you should sell it, recycle it, and then buy it.