Are there any books/papers/articles to describe how to develop a backtesting software? Something like backtest in quantopian website. How do they calculate the Cumulative performance?
There are many resources on the web but you need to think why you would want to do this in the first place. Are there not packages or frameworks out there already that will do what you need?
Also backtesting or any financial trading platform will be suited to a specific style or method of backtesting. Some are vectorised iterative processes (e.g. just a big for loop with some whistles added on) and others are reactive CEP based solutions (they rely on events coming in from a data feed then reacting to these in some ways) so unless you have a specific style of trading the former will work for most people.
In this blog post I describe how to backtest trading strategies with R:
It gives a step-by-step template which consists of the following steps:
- Load libraries and data
- Create your indicator
- Use indicator to create equity curve
- Evaluate strategy performance
Details and the fully documented code can be found in the post.