Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bobye committed Feb 18, 2019
1 parent 1ee0b53 commit 3029c63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/impl/day_sharpe.hpp
Expand Up @@ -106,7 +106,8 @@ namespace d2 {
struct sharpe {
template <size_t days>
static inline real_t op(const DaySharpeStats<days> &y_stats) {
return std::min(_sharpe_helper(y_stats.forward_return).sharpe, y_stats.best);
return _sharpe_helper(y_stats.forward_return).sharpe;
//return std::min(_sharpe_helper(y_stats.forward_return).sharpe, y_stats.best);
}
};
}
Expand Down
2 changes: 1 addition & 1 deletion tool/sharpe_finder.cpp
Expand Up @@ -102,7 +102,7 @@ int main(int argc, char* argv[]) {
vector<real_t> X_test;
vector<d2_label_t> y_test;
vector<unsigned long long int> orders_test;
int has_test = read_data(test_filename, X_test, y_test, orders_test, true);
bool has_test = read_data(test_filename, X_test, y_test, orders_test, true) == 0;

for (auto i=0; i < filenames.size(); ++i) {
string filename = filenames[i];
Expand Down

0 comments on commit 3029c63

Please sign in to comment.