{"id":24865541,"url":"https://github.com/kfl/american-options","last_synced_at":"2025-04-13T00:53:47.050Z","repository":{"id":3082000,"uuid":"4105831","full_name":"kfl/american-options","owner":"kfl","description":"Emperiments with algorithms for pricing American Options","archived":false,"fork":false,"pushed_at":"2015-10-27T09:50:52.000Z","size":242,"stargazers_count":6,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T00:53:32.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Standard ML","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/kfl.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":"2012-04-22T17:55:03.000Z","updated_at":"2020-03-23T20:49:33.000Z","dependencies_parsed_at":"2022-09-10T20:40:36.651Z","dependency_job_id":null,"html_url":"https://github.com/kfl/american-options","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/kfl%2Famerican-options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfl%2Famerican-options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfl%2Famerican-options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kfl%2Famerican-options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kfl","download_url":"https://codeload.github.com/kfl/american-options/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650439,"owners_count":21139672,"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":"2025-02-01T00:00:05.213Z","updated_at":"2025-04-13T00:53:47.029Z","avatar_url":"https://github.com/kfl.png","language":"Standard ML","funding_links":[],"categories":[],"sub_categories":[],"readme":"American Options\n================\n\nEmperiments with different libraries and (eventually) algorithms for\npricing American Options.  Currently only using a standard binomial\nmodel.\n\nThe various implementation in `AmrPut`* is based on the R-code from\nRolf Poulsen's FAMØS paper\n[Amerikanske optioner og finansielle beregninger](http://www.math.ku.dk/~rolf/FAMOES/Famoes_Follow-up.pdf).\n\n\nCompiling Haskell Versions\n--------------------------\n\nThe Haskell implementations do not define a Main module, so in order\nto compile them to standalone executables you have to pass an\nappropriate `-main-is` option to GHC.  For example:\n\n    ghc -O3 --make AmrPut.hs -main-is AmrPut -o AmrPut\n\nCheck the source file for the module name to use.\n\n\nBenmark Results from Haskell Version(s)\n---------------------------------------\n\nExperiments done using Haskell library `criterion`, on a MacBook Pro\n(early-2010 model).\n\n   Data.Vector.Unboxed, optimised with GHC 7.4.2 -O3 (AmrPut.hs)\n   \n        Fuction call            Time (ms)\n        ------------------------------------\n        AmrPut.binom 1          0.8 ±   0.02\n        AmrPut.binom 16       207   ±   6\n        AmrPut.binom 30       941   ±  36\n        AmrPut.binom 64      5576   ±  58 \n        AmrPut.binom 128    27750   ± 468 \n\n\n\nFusable Functional Vectors in Standard ML\n-----------------------------------------\n\nThe experiments below demonstrate that the use of fusable functional\nvectors (FFVs) can give a runtime improvement of more than 20 percent\ncompared to a Vector/VectorSlice implementation. The experiments were\ndone running with Mlton on a MacBook Pro (mid-2012 model):\n\n   Vector/VectorSlice (AmrPut.sml):\n\n\t     bash-3.2$ time ./AmrPutVec \n\t     AmrPut.binom(1) = 6.74543295136\n\t     AmrPut.binom(8) = 13.9456888384\n\t     AmrPut.binom(16) = 16.2225913859\n\t     AmrPut.binom(30) = 17.6537059071\n\t     AmrPut.binom(64) = 18.4299315651\n\t     AmrPut.binom(128) = 18.5737326153\n\n\t     real    0m17.551s\n\t     user    0m17.499s\n\t     sys     0m0.046s\n\n   Functional Vectors (AmrPutVec.sml):\n\n\t     bash-3.2$ time ./AmrPutVec \n\t     AmrPut.binom(1) = 6.74543295136\n\t     AmrPut.binom(8) = 13.9456888384\n\t     AmrPut.binom(16) = 16.2225913859\n\t     AmrPut.binom(30) = 17.6537059071\n\t     AmrPut.binom(64) = 18.4299315651\n\t     AmrPut.binom(128) = 18.5737326153\n\n\t     real    0m13.288s\n\t     user    0m13.272s\n\t     sys     0m0.015s\n\nWith the use of Unsafe.Vector in the implementation of the\nFvec.memoize function, real time drops to 12.57s.\n\nTo redo the experiments, for each case, alter the file\nAmrPutVecTest.sml appropriately and run \n\n    $ make AmrPutVec; time ./AmrPutVec\n\nTo get the desired speedups, the programmer is required to insert\nmemoize operations at subtle places in the source code; see the file\nAmrPutVec.sml for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfl%2Famerican-options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkfl%2Famerican-options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkfl%2Famerican-options/lists"}