-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored factories for payoff by eliminating unncesarry interfaces …
…so as to use static crete method, asn added factroeis for all options except barrier whihc will require to ad dthe knock bhevaiour to the payoff
- Loading branch information
1 parent
7dcf7ad
commit 26ba099
Showing
63 changed files
with
411 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
include/option/factories/path_dependent/american_option_factory.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/path_dependent/asian/arithmetic_asian_option_factory.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/path_dependent/asian/base_asian_option_factory.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/path_dependent/asian/geometric_asian_option_factory.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/path_dependent/barrier/barrier_knockin_option.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/path_dependent/barrier/barrier_knockout_option.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/path_dependent/barrier/base_barrier_option.h
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
include/option/factories/path_dependent/base_path_dependent_option_factory.h
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
include/option/factories/single_path/base_single_path_option_factory.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/single_path/digital_option_factory.h
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
include/option/factories/single_path/european_option_factory.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
include/option/path_dependent/asian/factory_arithmetic_asian_option.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef FACTORY_ARITHMETIC_ASIAN_OPTION_H | ||
#define FACTORY_ARITHMETIC_ASIAN_OPTION_H | ||
|
||
#include "option/factory_option.h" | ||
|
||
namespace OptionPricer { | ||
class ArithmeticAsianOptionFactory final: public OptionFactory { | ||
std::unique_ptr<Payoff> createSpecificPayoff(const ParameterObject& params, const std::string& type) override; | ||
|
||
std::shared_ptr<Option> createSpecificOption(const ParameterObject& params, | ||
std::unique_ptr<Payoff> payoff, | ||
const std::shared_ptr<IMarketData>& marketData) override; | ||
|
||
std::string getType(const std::string& type) const override; | ||
}; | ||
} | ||
|
||
#endif //FACTORY_ARITHMETIC_ASIAN_OPTION_H |
18 changes: 18 additions & 0 deletions
18
include/option/path_dependent/asian/factory_geometric_asian_option.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef FACTORY_GEOMETRIC_ASIAN_OPTION_H | ||
#define FACTORY_GEOMETRIC_ASIAN_OPTION_H | ||
|
||
#include "option/factory_option.h" | ||
|
||
namespace OptionPricer { | ||
class GeometricAsianOptionFactory final: public OptionFactory { | ||
std::unique_ptr<Payoff> createSpecificPayoff(const ParameterObject& params, const std::string& type) override; | ||
|
||
std::shared_ptr<Option> createSpecificOption(const ParameterObject& params, | ||
std::unique_ptr<Payoff> payoff, | ||
const std::shared_ptr<IMarketData>& marketData) override; | ||
|
||
std::string getType(const std::string& type) const override; | ||
}; | ||
} | ||
|
||
#endif //FACTORY_GEOMETRIC_ASIAN_OPTION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
include/option/path_dependent/barrier/factory_up_single_barrier_option.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef FACTORY_UP_SINGLE_BARRIER_OPTION_H | ||
#define FACTORY_UP_SINGLE_BARRIER_OPTION_H | ||
|
||
/* | ||
#include "option/factory_option.h" | ||
namespace OptionPricer { | ||
class UpSingleBarrierOptionFactory final: public OptionFactory { | ||
std::unique_ptr<Payoff> createSpecificPayoff(const ParameterObject& params, const std::string& type) override; | ||
std::shared_ptr<Option> createSpecificOption(const ParameterObject& params, | ||
std::unique_ptr<Payoff> payoff, | ||
const std::shared_ptr<IMarketData>& marketData) override; | ||
std::string getType(const std::string& type) const override; | ||
}; | ||
} | ||
*/ | ||
|
||
#endif //FACTORY_UP_SINGLE_BARRIER_OPTION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef FACTORY_AMERICAN_OPTION_H | ||
#define FACTORY_AMERICAN_OPTION_H | ||
|
||
#include "option/factory_option.h" | ||
|
||
namespace OptionPricer { | ||
class AmericanOptionFactory final: public OptionFactory { | ||
std::unique_ptr<Payoff> createSpecificPayoff(const ParameterObject& params, const std::string& type) override; | ||
|
||
std::shared_ptr<Option> createSpecificOption(const ParameterObject& params, | ||
std::unique_ptr<Payoff> payoff, | ||
const std::shared_ptr<IMarketData>& marketData) override; | ||
|
||
std::string getType(const std::string& type) const override; | ||
}; | ||
} | ||
|
||
#endif //FACTORY_AMERICAN_OPTION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.