Example #1
0
void Report::max_cons_neg( void ) const
{
  if( _rf.num() == 0 )
    return; // avoid exception during report

  PositionSet pset = _rf.max_cons_neg();
  cout << "Max cons neg: ";
  if( pset.empty() ) {
    cout << 0 << endl;
    return;
  }
  
  cout << (int)pset.size();
  _begin_end(pset);
}
Example #2
0
void Report::max_dd( void ) const
{
  if( _rf.num() == 0 )
    return; // avoid exception during report

  PositionSet pset = _rf.dd();
  cout << "Max drawdown: ";
  if( pset.empty() ) {
    cout << 0 << endl;
    return;
  }

  ReturnFactors ddrf(pset);
  cout << ddrf.roi()*100 << '%';
  _begin_end(pset);
}