|
American-transaction costs 1.0.0.0
American option pricer under proportional transaction costs
|
Flexible binomial tree with proportional transaction costs. More...
#include <binomial.h>
Public Member Functions | |
| coefficient | accumulate (const size_t n) const |
| coefficient | discount (const size_t n) const |
| coefficient | drift (const size_t n) const |
| coefficient | dt () const |
| void | EMM_exercise_function (const TreeProductAmericanSeller &product, const StatisticsGathererPath< Spot > &gather_spot, const StatisticsGathererSome< PiecewiseLinear > &gather_current_hedge, const StatisticsGathererPath< PiecewiseLinear > &gather_future_hedge, StatisticsGathererSome< coefficient > &value, StatisticsGathererPath< coefficient > &chi, StatisticsGathererSome< coefficient > &x, StatisticsGathererPath< coefficient > &y, StatisticsGathererPath< coefficient > &S, StatisticsGathererSome< coefficient > &p, StatisticsGatherer< Portfolio > &strategy, const coefficient shares=0.0) const |
| void | exercise_function (const TreeProductAmericanBuyer &product, const StatisticsGathererPath< Spot > &gather_spot, const StatisticsGathererPath< Portfolio > &strategy, StatisticsGathererPath< int > &decision) const |
| FlexibleTreeBinomial (const coefficient &S, const ParameterIntegrableBridge &sigma, const ParameterIntegrableBridge &kappa_sigma_square, const ShortRate &r, const ParameterBridge &mu, const ParameterBridge &lambda, const size_t N, const coefficient &T) | |
| StatisticsGathererPath< Portfolio > | hedge (const size_t scenario, const TreeProduct &product, const coefficient shares=0.0) const |
| StatisticsGathererPath< Portfolio > | hedge (const path_type &path, const TreeProduct &product, const coefficient shares=0.0) const |
| void | hedging_function (const TreeProduct &product, const StatisticsGathererPath< Spot > &gather_spot, const PiecewiseLinear ¤t_hedge, const StatisticsGathererPath< PiecewiseLinear > &gather_future_hedge, StatisticsGathererPath< Portfolio > &strategy, const coefficient shares=0.0) const |
| coefficient | jump (const size_t n) const |
| coefficient | lambda (const size_t n) const |
| coefficient | logS () const |
| coefficient | mu (const size_t n) const |
| size_t | N () const |
| size_t | nodes (const size_t n) const |
| path_type | path (const size_t scenario) const |
| coefficient | price (const TreeProduct &product, const Portfolio &wealth=Portfolio(0, 0)) const |
| void | pricing_function (const TreeProduct &product, StatisticsGatherer< Spot > &gather_spot, StatisticsGatherer< PiecewiseLinear > &gather_current_hedge, StatisticsGatherer< PiecewiseLinear > &gather_future_hedge) const |
| size_t | scenario (const path_type &path) const |
| size_t | scenarios () const |
| std::vector< Spot > | spot (const size_t n) const |
| void | spot_function (const size_t n, std::vector< Spot > &spot) const |
| StatisticsGathererPath< Spot > | spot_path (const size_t scenario) const |
| StatisticsGathererPath< Spot > | spot_path (const path_type &course) const |
| void | spot_path_function (StatisticsGathererPath< Spot > &gather_spot) const |
| path_type | successors (const size_t n, const size_t k) const |
| void | successors_function (const size_t n, const size_t k, path_type &successors) const |
| coefficient | T () const |
| std::vector< path_type > | with_siblings (const path_type &path) const |
Flexible binomial tree with proportional transaction costs.
The friction-free stock price follows the flexible binomial model of Chang, L.-B. & Palmer, K. "Smooth convergence in the binomial model", Finance and Stochastics, 2007, 11, 91-105, i.e. the underlying stock price
at time step
takes the form
where
.
| FlexibleTreeBinomial::FlexibleTreeBinomial | ( | const coefficient & | S, |
| const ParameterIntegrableBridge & | sigma, | ||
| const ParameterIntegrableBridge & | kappa_sigma_square, | ||
| const ShortRate & | r, | ||
| const ParameterBridge & | mu, | ||
| const ParameterBridge & | lambda, | ||
| const size_t | N, | ||
| const coefficient & | T | ||
| ) |
Constructor.
| S | Initial stock price |
| sigma | Stock price volatility |
| kappa_sigma_square | Stock price drift |
| r | Short rate |
| mu | Bid price premium |
| lambda | Ask price premium |
| N | Number of steps |
| T | Maturity date |
| coefficient FlexibleTree::accumulate | ( | const size_t | n | ) | const [inline, inherited] |
| coefficient FlexibleTree::discount | ( | const size_t | n | ) | const [inline, inherited] |
| coefficient FlexibleTree::drift | ( | const size_t | n | ) | const [inline, inherited] |
| coefficient FlexibleTree::dt | ( | ) | const [inline, inherited] |
Time between steps.
| void FlexibleTree::EMM_exercise_function | ( | const TreeProductAmericanSeller & | product, |
| const StatisticsGathererPath< Spot > & | gather_spot, | ||
| const StatisticsGathererSome< PiecewiseLinear > & | gather_current_hedge, | ||
| const StatisticsGathererPath< PiecewiseLinear > & | gather_future_hedge, | ||
| StatisticsGathererSome< coefficient > & | value, | ||
| StatisticsGathererPath< coefficient > & | chi, | ||
| StatisticsGathererSome< coefficient > & | x, | ||
| StatisticsGathererPath< coefficient > & | y, | ||
| StatisticsGathererPath< coefficient > & | S, | ||
| StatisticsGathererSome< coefficient > & | p, | ||
| StatisticsGatherer< Portfolio > & | strategy, | ||
| const coefficient | shares = 0.0 |
||
| ) | const [inherited] |
Service method. Computation of optimal equivalent martingale measure for product, with optimal superreplication strategy as side effect. The parameters gather_current_hedge and gather_future_hedge must have been part of the output of a run of pricing_function. The parameters spot, gather_current_hedge, gather_future_hedge, value, chi, x, y, S, p and strategy must pertain to the same scenario (enriched by adding relevant successor nodes): this is not checked. The processses
and
in the interval
and
,
and
in the bid-ask interval has the property that
for all
and nodes
and
for all
before N() and where the sum is taken over successors.
| void FlexibleTree::exercise_function | ( | const TreeProductAmericanBuyer & | product, |
| const StatisticsGathererPath< Spot > & | gather_spot, | ||
| const StatisticsGathererPath< Portfolio > & | strategy, | ||
| StatisticsGathererPath< int > & | decision | ||
| ) | const [inherited] |
Service method. Computes stopping time for the buyer of an option. The input strategy must superreplicate product for the buyer, and must correspond to the same scenario as gather_spot (this is not checked).
| StatisticsGathererPath<Portfolio> FlexibleTree::hedge | ( | const path_type & | path, |
| const TreeProduct & | product, | ||
| const coefficient | shares = 0.0 |
||
| ) | const [inherited] |
Computes superreplicating strategy for an option.
| path | Scenario in which to superreplicate |
| product | Objective to superreplicate |
| shares | Initial share holding. The cash holding is adjusted to reflect the cost of superreplication |
| StatisticsGathererPath<Portfolio> FlexibleTree::hedge | ( | const size_t | scenario, |
| const TreeProduct & | product, | ||
| const coefficient | shares = 0.0 |
||
| ) | const [inline, inherited] |
Computes superreplicating strategy for an option.
| scenario | Scenario in which to superreplicate |
| product | Objective to superreplicate |
| shares | Initial share holding. The cash holding is adjusted to reflect the cost of superreplication |
| void FlexibleTree::hedging_function | ( | const TreeProduct & | product, |
| const StatisticsGathererPath< Spot > & | gather_spot, | ||
| const PiecewiseLinear & | current_hedge, | ||
| const StatisticsGathererPath< PiecewiseLinear > & | gather_future_hedge, | ||
| StatisticsGathererPath< Portfolio > & | strategy, | ||
| const coefficient | shares = 0.0 |
||
| ) | const [inherited] |
Service method. Computation of superreplicating strategy for an option. The parameters current_hedge, gather_spot and gather_future_hedge must have been part of the output of a run of pricing_function (where current_hedge is the initial hedging function). The parameters gather_spot, portfolios and gather_future_hedge must pertain to the same scenario (this is not checked).
| coefficient FlexibleTree::jump | ( | const size_t | n | ) | const [inline, inherited] |
| coefficient FlexibleTree::lambda | ( | const size_t | n | ) | const [inline, inherited] |
Ask price premium at step n.
| coefficient FlexibleTree::logS | ( | ) | const [inline, inherited] |
Logarithm of initial stock price.
| coefficient FlexibleTree::mu | ( | const size_t | n | ) | const [inline, inherited] |
Bid price discount at step n.
| size_t FlexibleTree::N | ( | ) | const [inline, inherited] |
Number of steps.
| size_t FlexibleTreeBinomial::nodes | ( | const size_t | n | ) | const [virtual] |
Number of nodes at time step n. Nodes at time step n are numbered from 0 to nodes(n)-1.
Implements FlexibleTree.
| path_type FlexibleTreeBinomial::path | ( | const size_t | scenario | ) | const [virtual] |
Turns scenario code into path. Each scenario is given a unique positive number, which corresponds uniquely to the path of the stock price in that scenario.
| scenario | Index number of scenario |
Implements FlexibleTree.
| coefficient FlexibleTree::price | ( | const TreeProduct & | product, |
| const Portfolio & | wealth = Portfolio (0,0) |
||
| ) | const [inline, inherited] |
Price at time 0 of product for an investor with initial wealth wealth.
| void FlexibleTree::pricing_function | ( | const TreeProduct & | product, |
| StatisticsGatherer< Spot > & | gather_spot, | ||
| StatisticsGatherer< PiecewiseLinear > & | gather_current_hedge, | ||
| StatisticsGatherer< PiecewiseLinear > & | gather_future_hedge | ||
| ) | const [inherited] |
Service method. Pricing function at time 0 of product that allows gathering of statistics for use outside this class. Application of product.current_price() to the first value of gather_future_hedge yields the initial price.
| size_t FlexibleTreeBinomial::scenario | ( | const path_type & | path | ) | const [virtual] |
Turns path into scenario code. Each scenario is given a unique positive number, which corresponds uniquely to the path of the stock price in that scenario.
| path | (N()+1)-dimensional std::vector of node numbers, with the k-th entry being the node number at time k dt() |
Implements FlexibleTree.
| size_t FlexibleTreeBinomial::scenarios | ( | ) | const [virtual] |
Number of scenarios. Scenarios are numbered from 0 to scenarios()-1.
Implements FlexibleTree.
| std::vector<Spot> FlexibleTree::spot | ( | const size_t | n | ) | const [inline, inherited] |
Spot prices at time step n, indexed by node.
| void FlexibleTreeBinomial::spot_function | ( | const size_t | n, |
| std::vector< Spot > & | spot | ||
| ) | const [virtual] |
Service method. Spot prices at time step n, indexed by node.
Implements FlexibleTree.
| StatisticsGathererPath<Spot> FlexibleTree::spot_path | ( | const path_type & | course | ) | const [inline, inherited] |
Stock price path for given scenario.
| StatisticsGathererPath<Spot> FlexibleTree::spot_path | ( | const size_t | scenario | ) | const [inline, inherited] |
Stock price path for given scenario.
| void FlexibleTreeBinomial::spot_path_function | ( | StatisticsGathererPath< Spot > & | gather_spot | ) | const [virtual] |
Service method. Computes stock price path for scenario to which gather_spot has been initialised.
Implements FlexibleTree.
| path_type FlexibleTree::successors | ( | const size_t | n, |
| const size_t | k | ||
| ) | const [inline, inherited] |
Nodes at time step n + 1 that succeed node k at time step n.
| void FlexibleTreeBinomial::successors_function | ( | const size_t | n, |
| const size_t | k, | ||
| path_type & | successors | ||
| ) | const [virtual] |
Service method. Nodes at time step n + 1 that succeed node k at time step n.
Implements FlexibleTree.
| coefficient FlexibleTree::T | ( | ) | const [inline, inherited] |
Maturity date.
| std::vector<path_type > FlexibleTree::with_siblings | ( | const path_type & | path | ) | const [inline, inherited] |
Extends stock price path to include siblings of those nodes already on the path.
| path | An (N()+1)-dimensional std::vector of node numbers, with the k-th entry being the node number at time k dt(). |