{"id":15898365,"url":"https://github.com/pppw/financial-simulations","last_synced_at":"2025-08-27T17:20:26.371Z","repository":{"id":93596693,"uuid":"43526114","full_name":"PPPW/Financial-Simulations","owner":"PPPW","description":null,"archived":false,"fork":false,"pushed_at":"2016-01-02T22:33:40.000Z","size":414,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T09:37:20.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PPPW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-01T23:14:29.000Z","updated_at":"2015-10-01T23:16:36.000Z","dependencies_parsed_at":"2023-06-19T03:41:22.675Z","dependency_job_id":null,"html_url":"https://github.com/PPPW/Financial-Simulations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFinancial-Simulations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFinancial-Simulations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFinancial-Simulations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFinancial-Simulations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PPPW","download_url":"https://codeload.github.com/PPPW/Financial-Simulations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246875907,"owners_count":20848048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T10:02:32.927Z","updated_at":"2025-04-02T19:12:34.486Z","avatar_url":"https://github.com/PPPW.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Computing projects in M. Joshi's ``The concept and practice of mathematical finance``.\n\n# Instrument\nAbstract class. \n\nInclude:\n\nAPI:\n\n```\nInstrument() {}\nvirtual double getExpiry() const=0;\nvirtual double getPayOff(double spot) const=0;\n```\n\n## VanillaOption\n\nInclude:\t   \nInstrument.hpp\n\nAPI:\n\n```\nenum OptionType {call, put};\nVanillaOption(OptionType optionType_, \n              double expiry_,\n              double strike_);\nOptionType getType() const;   \ndouble getExpiry() const;\ndouble getStrike() const;\ndouble getPayOff(double spot) const;\n```\n\n---\n\n# PathGenerator\nAbstract class. \n\nInclude:\nvector\n\nAPI:\n\n```\nPathGenerator() {}                       \nvirtual std::vector\u003cdouble\u003e getPaths()=0;\nvirtual double getExpiry()=0;            \n```\n\n## BlackScholesPathGenerator\n\nInclude:\nboost/random.hpp\nboost/shared_ptr.hpp\n\nAPI:\n\n```\nBlackScholesPathGenerator(double spot_, \n                          double drift_, \n                          double dvdnt_, \n                          double vol_, \n                          double expiry_,\n                          unsigned long NumOfSteps_);\nvirtual std::vector\u003cdouble\u003e getPaths();\ndouble getExpiry();\n```\n\n---\n\n# HedgingStrategy\nAbstract class. \n\nInclude:\nPathGenerator.hpp\nvector\n\nAPI:\n\n```\nHedgingStrategy() {}                               \nvirtual std::vector\u003cdouble\u003e getHedgingStategy()=0; \n```\n\n## BlackScholesHedgingStrategy\nInclude:\n\n\nAPI:\n\n```\nBlackScholesHedgingStrategy(PathGenerator\u0026 path_,\n                            VanillaOption\u0026 option_,\n                            double r_,\n                            double dvdnt_,\n                            double vol_);\nvirtual std::vector\u003cdouble\u003e getHedgingStategy();\n```\n\n---\n\n# HedgingPnL\n\nInclude: \nPathGenerator.hpp\nHedgingStrategy.hpp\n\nAPI:\n\n```\nHedgingPnL(PathGenerator\u0026 path_,      \n           HedgingStrategy\u0026 strategy_,\n           double r_,                 \n           double initialValue_);     \ndouble getPnL();                      \n```\n\n---\n\n# MonteCarlo\n\nInclude:\nInstrument.hpp\nvector\n\nAPI:\n\n```\nMonteCarlo(Instrument\u0026 instrument_,           \n           double spot_,                      \n           double r_,                         \n           double dvdnt_,                     \n           double vol_,                       \n           unsigned long Dimensionality_);    \nstd::vector\u003cstd::vector\u003cdouble\u003e \u003e simulate(); \n```\n\n---\n\n# BlackScholesFormulas\nInclude:\n\nAPI:\n\n```\ndouble BlackScholesCall(double spot, \n                        double strike, \n                        double expiry, \n                        double r, \n                        double dvdnt, \n                        double vol);\ndouble BlackScholesPut(double spot, \n                       double strike, \n                       double expiry, \n                       double r, \n                       double dvdnt, \n                       double vol);\n```\n\n# VanillaGreeks\nInclude:\n\nAPI:\n```\ndouble DeltaCall(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);\ndouble DeltaPut(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);\ndouble Gamma(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);double Vega(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);\ndouble RhoCall(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);double RhoPut(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);double ThetaCall(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);\ndouble ThetaPut(double spot, double strike, \n\t\t\t\t\t\t double expiry, double r, \n\t\t\t\t\t\t double dvdnt, double vol);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpppw%2Ffinancial-simulations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpppw%2Ffinancial-simulations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpppw%2Ffinancial-simulations/lists"}