-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbacktestRunner.hpp
More file actions
25 lines (21 loc) · 1.04 KB
/
Copy pathbacktestRunner.hpp
File metadata and controls
25 lines (21 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Backtesting Engine in C++
//
// (c) 2026 Ryan McCaffery | https://mccaffers.com
// This code is licensed under MIT license (see LICENSE.txt for details)
// ---------------------------------------
#pragma once
#include <string>
#include <vector>
#include "models/priceData.hpp"
#include "trading_definitions/configuration.hpp"
// Pulls all tick data for the run's symbols/window out of QuestDB. Expensive —
// call once per run and reuse the result across that run's strategies.
std::vector<PriceData> loadTicks(const std::string& questdbHost,
const std::string& symbolsCsv,
int lastMonths);
// Runs one backtest against already-loaded ticks (no QuestDB access).
void runBacktestOnTicks(const std::vector<PriceData>& ticks,
const trading_definitions::Configuration& config);
// Convenience for the direct path: loads ticks then runs a single backtest.
int runBacktest(const std::string& questdbHost,
const trading_definitions::Configuration& config);