American-transaction costs 1.0.0.0
American option pricer under proportional transaction costs
spot.h
Go to the documentation of this file.
00001 /*
00002     American option pricer under proportional transaction costs
00003     Copyright (C) 2011 Alet Roux alet.roux@york.ac.uk
00004 
00005     This program is free software: you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation, either version 3 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 
00018 */
00019 
00020 #ifndef SPOT_H
00021 #define SPOT_H
00022 
00023 #include <ostream>
00024 #include "numbers.h"
00025 
00031 
00032 
00036 class Spot
00037 {
00038 public:
00039         Spot (const coefficient& underlying = NAN)
00040                         : _bid (underlying), _ask (underlying), _underlying (underlying)
00041         {}
00042 
00043         Spot (const coefficient bid, const coefficient underlying, const coefficient ask)
00044                         : _bid (bid), _ask (ask), _underlying (underlying)
00045         {}
00046 
00048         inline coefficient bid() const;
00049 
00051         inline coefficient ask() const;
00052 
00054         inline coefficient underlying() const;
00055 
00056 private:
00057         coefficient _bid, _ask, _underlying;
00058 
00059 };
00060 
00061 coefficient Spot::bid() const
00062 {
00063         return _bid;
00064 }
00065 
00066 coefficient Spot::ask() const
00067 {
00068         return _ask;
00069 };
00070 
00071 coefficient Spot::underlying() const
00072 {
00073         return _underlying;
00074 };
00075 
00076 std::ostream& operator<< (std::ostream& output, const Spot& spot);
00077 
00078 
00079 #endif // SPOT_H
 All Classes Namespaces Files Functions Variables Typedefs Defines