Skip to content

Commit

Permalink
Got rid of some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
evanwporter committed Oct 1, 2023
1 parent 2af95f0 commit 28a44a3
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 36 deletions.
17 changes: 1 addition & 16 deletions Engines/backtester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,4 @@ void Backtester::optimize () {

}
// std::cout << std::distance(results.begin(), std::max_element(results.begin(), results.end()));
}

// void Backtester::optimizer_run() {
// for(dh.current = dh.warmup_period; dh.current < dh.total_bars; dh.current++) {
// p.update_value();
// for (auto symbol : dh.symbols) {
// if (dh.symbol_data_locations[symbol][0] <= dh.current && dh.current < dh.symbol_data_locations[symbol][1]) {
// s->on_data(symbol);
// };
// };
// };
// std::cout << "here4;

// m = Metrics(&p);
// m.TIME_TAKEN = 0;
// }
}
1 change: 1 addition & 0 deletions Libraries/VariadicTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class VariadicTable
*/
template <typename StreamType>
void print(StreamType & stream)
// friend std::ostream& operator<<(ostream& os, const VariadicTable& vt)
{
size_columns();

Expand Down
11 changes: 1 addition & 10 deletions Strategy/ma_crossover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,4 @@ void MovingAverageCrossover::on_data(std::string symbol)
money current_price = bars.tail<1>()[0];
if (moving_average < current_price) rh->on_signal(symbol, Direction::LONG_);
else rh->on_signal(symbol, Direction::SHORT_);
}

// void MovingAverageCrossover::on_data(std::string symbol, int p)
// {
// MoneyVectorX bars = dh->getLatestBarsN(symbol, p).col(dh->symbol_headers[symbol]["Adj Close"]);
// money moving_average = bars.mean();
// money current_price = bars.tail<1>()[0];
// if (moving_average < current_price) rh->on_signal(symbol, Direction::LONG_);
// else rh->on_signal(symbol, Direction::SHORT_);
// }
}
4 changes: 0 additions & 4 deletions Strategy/ma_crossover.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ class MovingAverageCrossover : public Strategy {
MovingAverageCrossover(DataHandler *data_handler, RiskHandler *risk_handler);

void on_data(std::string symbol);
// virtual void opt_on_data(std::string symbol, int p) = 0;


int param = 0;
};
};

Expand Down
6 changes: 0 additions & 6 deletions Strategy/strategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ class Strategy {
RiskHandler *rh;

virtual void on_data(std::string symbol) = 0;
// virtual void opt_on_data(std::string symbol, int p) = 0;


// void modify_param(int p) {
// param = p;
// }

int parameter;

Expand Down
Binary file modified engine.exe
Binary file not shown.

0 comments on commit 28a44a3

Please sign in to comment.