progress
This commit is contained in:
parent
50435f8b3b
commit
8b28b8d5f9
18
README.md
18
README.md
@ -4,18 +4,24 @@ This document provides a guide to understanding, configuring, and running the pa
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
The system is designed to backtest pairs trading strategies on historical market data. It allows users to select different strategies, configure parameters, and analyze the performance of these strategies.
|
The system is designed to backtest pairs trading strategies on historical market data.
|
||||||
|
It allows users to select different strategies, configure parameters, and analyze the
|
||||||
|
performance of these strategies.
|
||||||
|
|
||||||
## Core Concepts
|
## Core Concepts
|
||||||
|
|
||||||
### Trading Pair
|
### Trading Pair
|
||||||
A trading pair consists of two financial instruments (e.g., stocks or cryptocurrencies) whose prices are believed to have a long-term statistical relationship (cointegration). The strategy aims to profit from temporary deviations from this relationship.
|
A trading pair consists of two financial instruments (e.g., stocks or cryptocurrencies)
|
||||||
|
whose prices are believed to have a long-term statistical relationship (cointegration).
|
||||||
|
The strategy aims to profit from temporary deviations from this relationship.
|
||||||
|
|
||||||
### Strategy
|
### Strategy
|
||||||
The system supports different strategies for identifying and exploiting trading opportunities. Each strategy has its own set of configurable parameters.
|
The system supports different strategies for identifying and exploiting trading opportunities. Each strategy has its own set of configurable parameters.
|
||||||
|
|
||||||
### Trading Signals
|
### Trading Signals
|
||||||
Trading signals indicate when to open or close a position based on the configured strategy and parameters. These signals are typically generated when the "dis-equilibrium" (the deviation from the long-term relationship) crosses certain thresholds.
|
Trading signals indicate when to open or close a position based on the configured strategy
|
||||||
|
and parameters. These signals are typically generated when the "dis-equilibrium" (the
|
||||||
|
deviation from the long-term relationship) crosses certain thresholds.
|
||||||
|
|
||||||
## Running a Backtest
|
## Running a Backtest
|
||||||
|
|
||||||
@ -54,7 +60,11 @@ The system currently offers two main strategies: `StaticFitStrategy` and `Slidin
|
|||||||
STRATEGY = SlidingFitStrategy()
|
STRATEGY = SlidingFitStrategy()
|
||||||
```
|
```
|
||||||
|
|
||||||
- **`StaticFitStrategy`**: This strategy fits the cointegration model once at the beginning of each trading day (or for the entire dataset if run on a single file without a rolling window logic in the strategy itself). The parameters (mean, standard deviation of dis-equilibrium) derived from this initial fit are used for generating trading signals throughout the day.
|
- **`StaticFitStrategy`**: This strategy fits the cointegration model once at the beginning
|
||||||
|
of each trading day (or for the entire dataset if run on a single file without a rolling
|
||||||
|
window logic in the strategy itself). The parameters (mean, standard deviation of
|
||||||
|
dis-equilibrium) derived from this initial fit are used for generating trading signals
|
||||||
|
throughout the day.
|
||||||
- **Pros**: Simpler, computationally less intensive.
|
- **Pros**: Simpler, computationally less intensive.
|
||||||
- **Cons**: May not adapt well to changing market conditions during the day.
|
- **Cons**: May not adapt well to changing market conditions during the day.
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user