Ejemplo n.º 1
0
double ShortPosition::factor( const boost::gregorian::date_period& dp, EODDB::PriceType pt ) const throw(PositionException)
{
  // Verify that input period is contained within position holding period
  if( ! hold_period().contains(dp) )
    throw PositionException("Requested factor period is out of Position range");

  return Price::get(_symbol, dp.begin(), pt) / Price::get(_symbol, dp.end(), pt);
}
Ejemplo n.º 2
0
		string ToString() { return CombineString(Currency.ToString(), DespoitType.ToString(),
									date::to_iso_string(Period.begin()), date::to_iso_string(Period.end()),
									date::to_iso_string(LastUpdateDate));
		}