American-transaction costs 1.0.0.0
American option pricer under proportional transaction costs
Portfolio Class Reference

Holdings of cash and stock. More...

#include <portfolio.h>

List of all members.

Public Member Functions

void accumulate (const coefficient R)
void accumulate (const ShortRate &r, const coefficient t1, const coefficient t2)
void buy (const coefficient s, const Spot &spot)
coefficient cash () const
Portfoliooperator*= (const coefficient scale)
Portfoliooperator+= (const Portfolio &portfolio)
Portfolio operator- () const
Portfoliooperator= (const Portfolio &portfolio)
 Portfolio (const coefficient shares=NAN, const coefficient cash=NAN)
coefficient shares () const
coefficient value (const coefficient spot) const

Detailed Description

Holdings of cash and stock.


Constructor & Destructor Documentation

Portfolio::Portfolio ( const coefficient  shares = NAN,
const coefficient  cash = NAN 
) [inline]

Member Function Documentation

void Portfolio::accumulate ( const coefficient  R) [inline]

Cash accumulation at the rate R -1.

void Portfolio::accumulate ( const ShortRate r,
const coefficient  t1,
const coefficient  t2 
) [inline]

Accumulates interest between t1 and t2 at the rate r.

void Portfolio::buy ( const coefficient  s,
const Spot spot 
) [inline]

Buys (if positive) or sell (if negative) x shares. Cash is adjusted in self-financing way by using spot.

coefficient Portfolio::cash ( ) const [inline]

Amount of cash in the portfolio.

Portfolio& Portfolio::operator*= ( const coefficient  scale) [inline]

Multiplication operator.

Portfolio& Portfolio::operator+= ( const Portfolio portfolio) [inline]

Addition operator.

Portfolio Portfolio::operator- ( ) const [inline]

Negation operator.

Portfolio& Portfolio::operator= ( const Portfolio portfolio) [inline]

Assignment operator.

coefficient Portfolio::shares ( ) const [inline]

Number of shares in the portfolio.

coefficient Portfolio::value ( const coefficient  spot) const [inline]

computes notional value for a given notional share value


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Defines