Trading backtest results analysis.
A trend-following strategy based on the idea that long sideways movement often creates new trends, or trends will move into sideways after some time. This means trades are not standalone events. When market conditions are poor, multiple losses in a row are normal for strategies with low win rates. I need a new way to measure the strategy's success rate.
Prepare data for the AI agent to calculate the success rate
Idea from kadane's algorithm to solve max sub array problem. It is the most important thing to know how much you could lose.
Calculate max accumulation loss.
Looking for if some data features hide in transaction first day price range.
Download Data from Taiwan Government and clean up.
Remain TX category and drop other contract price record.