{"id":13394745,"url":"https://github.com/jasonstrimpel/volatility-trading","last_synced_at":"2025-05-14T10:11:19.534Z","repository":{"id":40275266,"uuid":"20841908","full_name":"jasonstrimpel/volatility-trading","owner":"jasonstrimpel","description":"A complete set of volatility estimators based on Euan Sinclair's Volatility Trading ","archived":false,"fork":false,"pushed_at":"2024-10-21T17:00:05.000Z","size":8151,"stargazers_count":1668,"open_issues_count":4,"forks_count":383,"subscribers_count":84,"default_branch":"master","last_synced_at":"2025-04-04T14:14:42.959Z","etag":null,"topics":["options","options-trading","python","trading","volatility","volatility-trading"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasonstrimpel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-14T21:04:23.000Z","updated_at":"2025-04-03T22:49:41.000Z","dependencies_parsed_at":"2023-02-10T05:45:29.703Z","dependency_job_id":"202164a7-871b-43a3-8e30-5071a60198de","html_url":"https://github.com/jasonstrimpel/volatility-trading","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/jasonstrimpel%2Fvolatility-trading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonstrimpel%2Fvolatility-trading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonstrimpel%2Fvolatility-trading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonstrimpel%2Fvolatility-trading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonstrimpel","download_url":"https://codeload.github.com/jasonstrimpel/volatility-trading/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248469125,"owners_count":21108962,"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":["options","options-trading","python","trading","volatility","volatility-trading"],"created_at":"2024-07-30T17:01:30.172Z","updated_at":"2025-04-11T19:45:27.163Z","avatar_url":"https://github.com/jasonstrimpel.png","language":"Python","funding_links":[],"categories":["Alpha Collections","\u003ca id=\"e1fc1d87056438f82268742dc2ba08f5\"\u003e\u003c/a\u003e事件响应\u0026\u0026取证\u0026\u0026内存取证\u0026\u0026数字取证","Python","Reproducing Works","Reproducing Works, Training \u0026 Books","\u003ca id=\"4d2a33083a894d6e6ef01b360929f30a\"\u003e\u003c/a\u003eVolatility"],"sub_categories":["General Alpha","\u003ca id=\"4d2a33083a894d6e6ef01b360929f30a\"\u003e\u003c/a\u003eVolatility","Data Visualization"],"readme":"# volest #\n\n## Learn how to apply this code to your own options trading ##\n\n[Getting Started With Python for Quant Finance](https://gettingstartedwithpythonforquantfinance.com) is the cohort-based course and community that will take you from complete beginner to up and running with Python for quant finance in 30 days.\n\n## [A complete set of volatility estimators based on Euan Sinclair's Volatility Trading](https://amzn.to/3UhddGP) ##\n\nThe original version incorporated network data acquisition from Yahoo!Finance\nfrom `pandas_datareader`. Yahoo! changed their API and broke `pandas_datareader`.\n\nThe changes allow you to specify your own data so you're not tied into equity\ndata from Yahoo! finance. If you're still using equity data, just download\na CSV from finance.yahoo.com and use the `data.yahoo_data_helper` method\nto form the data properly.\n\n### Volatility estimators include: ###\n\n* Garman Klass\n* Hodges Tompkins\n* Parkinson\n* Rogers Satchell\n* Yang Zhang\n* Standard Deviation\n\nAlso includes\n\n* Skew\n* Kurtosis\n* Correlation\n\nFor each of the estimators, plot:\n\n* Probability cones\n* Rolling quantiles\n* Rolling extremes\n* Rolling descriptive statistics\n* Histogram\n* Comparison against arbirary comparable\n* Correlation against arbirary comparable\n* Regression against arbirary comparable\n\nCreate a term sheet with all the metrics printed to a PDF.\n\n### Page 1 - Volatility cones ###\n![Capture-1](docs/img/1.png)\n\n### Page 2 - Volatility rolling percentiles ###\n![Capture-2](docs/img/2.png)\n\n### Page 3 - Volatility rolling min and max ###\n![Capture-3](docs/img/3.png)\n\n### Page 4 - Volatility rolling mean, standard deviation and zscore ###\n![Capture-4](docs/img/4.png)\n\n### Page 5 - Volatility distribution ###\n![Capture-5](docs/img/5.png)\n\n### Page 6 - Volatility, benchmark volatility and ratio###\n![Capture-6](docs/img/6.png)\n\n### Page 7 - Volatility rolling correlation with benchmark ###\n![Capture-7](docs/img/7.png)\n\n### Page 3 - Volatility OLS results ###\n![Capture-8](docs/img/8.png)\n\nExample usage:\n\n```python\n\nfrom volatility import volest\nimport yfinance as yf\n\n# data\nsymbol = 'JPM'\nbench = 'SPY'\nestimator = 'GarmanKlass'\n\n# estimator windows\nwindow = 30\nwindows = [30, 60, 90, 120]\nquantiles = [0.25, 0.75]\nbins = 100\nnormed = True\n\n# use the yahoo helper to correctly format data from finance.yahoo.com\njpm_price_data = yf.Ticker(symbol).history(period=\"5y\")\njpm_price_data.symbol = symbol\nspx_price_data = yf.Ticker(bench).history(period=\"5y\")\nspx_price_data.symbol = bench\n\n# initialize class\nvol = volest.VolatilityEstimator(\n    price_data=jpm_price_data,\n    estimator=estimator,\n    bench_data=spx_price_data\n)\n\n# call plt.show() on any of the below...\n_, plt = vol.cones(windows=windows, quantiles=quantiles)\n_, plt = vol.rolling_quantiles(window=window, quantiles=quantiles)\n_, plt = vol.rolling_extremes(window=window)\n_, plt = vol.rolling_descriptives(window=window)\n_, plt = vol.histogram(window=window, bins=bins, normed=normed)\n\n_, plt = vol.benchmark_compare(window=window)\n_, plt = vol.benchmark_correlation(window=window)\n\n# ... or create a pdf term sheet with all metrics in term-sheets/\nvol.term_sheet(\n    window,\n    windows,\n    quantiles,\n    bins,\n    normed\n)\n\n```\n\nHit me on twitter with comments, questions, issues @jasonstrimpel\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonstrimpel%2Fvolatility-trading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonstrimpel%2Fvolatility-trading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonstrimpel%2Fvolatility-trading/lists"}