{"id":33193663,"url":"https://github.com/prodipta/bsoption","last_synced_at":"2026-01-17T12:00:50.696Z","repository":{"id":88677808,"uuid":"97054307","full_name":"prodipta/bsoption","owner":"prodipta","description":"Package for option pricing and volatility calibration for index (and FX) options","archived":false,"fork":false,"pushed_at":"2018-02-23T02:45:07.000Z","size":18,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-18T12:35:13.603Z","etag":null,"topics":["option-pricing","sabr","volatility"],"latest_commit_sha":null,"homepage":null,"language":"R","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/prodipta.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-07-12T21:41:48.000Z","updated_at":"2024-03-14T23:52:44.000Z","dependencies_parsed_at":"2023-03-09T09:01:05.313Z","dependency_job_id":null,"html_url":"https://github.com/prodipta/bsoption","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prodipta/bsoption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodipta%2Fbsoption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodipta%2Fbsoption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodipta%2Fbsoption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodipta%2Fbsoption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prodipta","download_url":"https://codeload.github.com/prodipta/bsoption/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodipta%2Fbsoption/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["option-pricing","sabr","volatility"],"created_at":"2025-11-16T07:00:31.294Z","updated_at":"2026-01-17T12:00:50.678Z","avatar_url":"https://github.com/prodipta.png","language":"R","funding_links":[],"categories":["\u003ca id=\"4d2a33083a894d6e6ef01b360929f30a\"\u003e\u003c/a\u003eVolatility"],"sub_categories":[],"readme":"# bsoption\n\nThe goal of this R package (bsoption) is to provide a quick platform for pricing index (and currency) exchange traded options. This also include a SABR and quadratic smile volatility calibration method. Also user can extract implied and realized distributions and use a given underlying distribution to price options for relative value analysis.\n\n## Installation\n\nYou can install bsoption from github with:\n\n```R\n# install.packages(\"devtools\")\ndevtools::install_github(\"prodipta/bsoption\")\n```\n\n## Example\n\nThis is a basic example which shows you how to calibrate a SABR vol from market prices of options. The dataframe opt_chain is provided with the package:\n\n```R\n?opt_chain\nsabrVol \u003c- calibrate(opt_chain,as.Date(\"2017-07-11\"),model=\"sabr\")\nquadVol \u003c- calibrate(opt_chain,as.Date(\"2017-07-11\"))\nk \u003c- seq(90,110,0.5)\nvols1 \u003c- getVol(sabrVol,100,k)\nvols2 \u003c- getVol(quadVol,100,k)\nplot(k,vols1,type=\"n\")\nlines(k,vols1,col=\"red\")\nlines(k,vols2,col=\"blue\")\n```\nFollowing example shows how to extract implied probability distribution and use that to price an option\n\n```R\nvoldist \u003c- impliedDistribution(sabrVol)\nplot(voldist$k,voldist$p,type=\"n\")\nlines(voldist$k,voldist$p,col=\"blue\")\ndistributionPricer(100,101,voldist,type=\"call\")\n```\n\nFollowing example shows how to exatract implied volatility and use the main pricing function to price options. These functions can handle fractional day pricing (the date argument should be in POSIX format in YYYY:MM:DD HH:MM).\n\n```R\nvol \u003c- bsImpliedVol(as.Date(\"2017-07-13\"),9879.55,10000,as.Date(\"2017-07-27\"),25.40,type=\"call\")\nbsPlainVanillaOption(as.Date(\"2017-07-13\"),9879.55,10000,as.Date(\"2017-07-27\"),vol ,type=\"call\")\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodipta%2Fbsoption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprodipta%2Fbsoption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodipta%2Fbsoption/lists"}