{"id":27000076,"url":"https://github.com/arec1b0/hft_trading_system","last_synced_at":"2025-11-05T00:02:41.903Z","repository":{"id":283571096,"uuid":"852042210","full_name":"arec1b0/hft_trading_system","owner":"arec1b0","description":"High-frequency trading system with backtesting and risk management.","archived":false,"fork":false,"pushed_at":"2024-09-21T02:33:35.000Z","size":466,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T23:33:59.143Z","etag":null,"topics":["algorithms-trading","backtesting","cpp","hft-trading","risk-management"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arec1b0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-04T06:00:47.000Z","updated_at":"2025-01-16T12:00:31.000Z","dependencies_parsed_at":"2025-03-21T16:46:22.004Z","dependency_job_id":null,"html_url":"https://github.com/arec1b0/hft_trading_system","commit_stats":null,"previous_names":["arec1b0/hft_trading_system"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Fhft_trading_system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Fhft_trading_system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Fhft_trading_system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Fhft_trading_system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arec1b0","download_url":"https://codeload.github.com/arec1b0/hft_trading_system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112865,"owners_count":20885622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms-trading","backtesting","cpp","hft-trading","risk-management"],"created_at":"2025-04-04T03:18:43.996Z","updated_at":"2025-11-05T00:02:41.811Z","avatar_url":"https://github.com/arec1b0.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HFT Trading System\n\n## Project Overview\nThis is a High-Frequency Trading (HFT) system designed to test various trading strategies through backtesting, as well as to manage risk with a set of defined risk strategies. The system includes a modular design for strategies, risk management, logging, and monitoring, allowing for easy expansion and customization.\n\n## Features\n- **Backtesting**: Simulates trades on historical data to assess strategy performance.\n- **Trading Strategies**:\n  - Scalping\n  - Mean Reversion\n  - Custom strategies can be easily added.\n- **Risk Management**:\n  - Max Drawdown Strategy\n  - Exposure Limit Strategy\n  - Support for additional risk strategies.\n- **Logging and Monitoring**: Captures key metrics and logs during system execution.\n- **Docker and Kubernetes Support**: The system can be containerized using Docker and orchestrated with Kubernetes.\n\n## Installation\n\n### Prerequisites\n- **CMake**: Make sure CMake is installed.\n- **GCC**: C++ compiler for building the project.\n- **Google Test**: For running the unit tests.\n- **Docker** (optional): To run the system in a containerized environment.\n\n### Building the Project\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/dkrizhanovskyi/hft_trading_system.git\n   cd hft_trading_system\n   ```\n\n2. Build the project:\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   cmake ..\n   make\n   ```\n\n### Running the Application\n\nOnce the project is built, you can run the system using the following command:\n\n```bash\n./HFTTradingSystem\n```\n\n### Running with Docker\n\n1. Build the Docker image:\n   ```bash\n   docker build -t hft_trading_system .\n   ```\n\n2. Run the container:\n   ```bash\n   docker run -p 8080:8080 hft_trading_system\n   ```\n\n### Running the Tests\n\nUnit tests are located in the `tests/` directory. To run the tests, use the provided script or run them manually:\n\n```bash\n./scripts/run_tests.sh\n```\n\nAlternatively, if you are using CMake:\n```bash\ncd build\nctest --output-on-failure\n```\n\n## Usage\n\n- **Backtesting**: The system allows you to run backtests using historical data. Strategies are configurable through the `strategy_manager` module.\n- **Risk Management**: Implement risk strategies to avoid significant losses during trading. Custom risk strategies can be added.\n- **Logging**: All trades and system metrics are logged, making it easier to track system performance.\n\n## Configuration\n\nConfigurations are stored in `include/config/settings.h`. Key parameters such as file paths for historical data, strategy thresholds, and risk limits can be adjusted here.\n\nExample:\n```cpp\n// include/config/settings.h\nconst std::string HISTORICAL_DATA_FILE = \"data/historical_data.csv\";\nconst double MAX_DRAWDOWN_LIMIT = 0.2;\nconst int SCALPING_STRATEGY_THRESHOLD = 5;\n```\n\n## Deployment\n\n### Using Kubernetes\n\n1. Deploy the application using Kubernetes:\n   ```bash\n   kubectl apply -f kubernetes/deployment.yaml\n   kubectl apply -f kubernetes/service.yaml\n   ```\n\n2. Check the status of pods and services:\n   ```bash\n   kubectl get pods\n   kubectl get services\n   ```\n\n### Using Terraform\n\n1. Initialize Terraform:\n   ```bash\n   cd terraform\n   terraform init\n   ```\n\n2. Apply the Terraform configuration:\n   ```bash\n   terraform apply\n   ```\n\n## Contributing\n\nFeel free to fork this repository and contribute by submitting pull requests. Please ensure that your changes are well tested and documented.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farec1b0%2Fhft_trading_system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farec1b0%2Fhft_trading_system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farec1b0%2Fhft_trading_system/lists"}