# Earnings Strategies and Stock Data
This package shows multiple data for stocks nearing earnings like its expected move, historical earnings effect, the Gaussian probability of an option being assigned, etc. This package allows traders to conveniently formulate the best strategies for any stock with earnings every day.
Check Today is the aggregate function that contain all the necessary information such as the list of companies with earnings, combined option chain, and historical earnings price effect to help trade stocks with earnings for that day. It pretty-prints its output to HTML files, allowing for a quick and convenient scan.
## Common Strategies
### Expected Move > Earning's Effect Estimate
- Gain from Gamma Crush
- Selling CSP
- Selling Straddles and Strangles
- Iron Condor or Butterfly
### Expected Move < Earning's Effect Estimate even accommodating Gamma Risk
- Buying Undervalued Options
- Buying Spreads
<br></br>
## Quick Start
<strong> Functions return pandas DataFrame unless specified elsewise </strong>
### Today_Data
```python
import earningstrats.today_data as td
"""
Returns tuple of today AMC and tomorrow BMO companies' put option chain and historical earnings price effect
Change days_added to shift day by that much. Customize minimum volume sum and stock price
[0] - OTM Put option Chain
[1] - Historical earnings price effect = Change period to change how far back historical price effect shows
Outputs to today_companies.html, today_options.html, today_price_effect.html
"""
td.check_today(period = "5y", day_shift = 0, min_vol_sum = 3000, min_stock_price = 10)
```
### Earnings
```python
import earningstrats.earnings as ea
"""
Get a stock's historical earnings price effect. Calculates earnings effect from market close -> next day open and next day close
Change period to change how far back historical price effect shows
"""
ea.get_stock_earnings_price_effect(symbol, period = "5y")
"""
Get all the stocks with earnings today AMC or tomorrow BMO
"""
ea.get_companies_with_earnings_today_AMC_or_tomm_BMO(day_shift = 0, min_vol_sum = 3000, min_stock_price = 10)
```
### Options
```python
import earningstrats.options as opd
"""
Get Expected Move for a stock for the earliest option deadline. Returns tuple
[0] - IV Expected Move
[1] - ATM Straddle Expected Move
[2] - ATM Straddle + 1st Strangle Expected Move
[3] - Aggregate Estimate of Stock Expected Move (Used in calculations)
"""
opd.get_expected_move(symbol)
"""
Gets the put option chain. Defaults to finding only OTM puts. Set price_ceiling to set cutoff
Contains the Gaussian probability of option being assigned as well as the expected moves of a stock
"""
opd.get_put_option_chain(symbol, price_ceiling = -1)
# Get current stock price of stock
opd.get_current_stock_price(symbol)
# Get days left until earliest option expiration
opd.get_days_to_expiration(symbol)
# Get the earliest expiration option chain
opd.get_earliest_deadline_options_chain(symbol)
# Get the entire put option chain
opd.get_all_put_options(symbol)
```
### Option_Set
```python
import earningstrats.option_set as ops
# Returns a set of stocks with weekly options
ops.get_stocks_with_weekly_options()
# Returns a set of stocks with options
ops.get_stocks_with_options()
```
## License
earningstrats is distributed under the Apache Software License. See the LICENSE file in the release for details
Raw data
{
"_id": null,
"home_page": "https://github.com/woojuyim/earningstrats",
"name": "earningstrats",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "pandas,yahoo finance,earnings,gamma,options",
"author": "Wooju Yim",
"author_email": "woojuyim126@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/83/56/c4ee1ddb10208e12a9679959fb495d97987fb403727f104d0ac7ef88016d/earningstrats-0.1.6.tar.gz",
"platform": "any",
"description": "# Earnings Strategies and Stock Data\r\n\r\nThis package shows multiple data for stocks nearing earnings like its expected move, historical earnings effect, the Gaussian probability of an option being assigned, etc. This package allows traders to conveniently formulate the best strategies for any stock with earnings every day.\r\n\r\nCheck Today is the aggregate function that contain all the necessary information such as the list of companies with earnings, combined option chain, and historical earnings price effect to help trade stocks with earnings for that day. It pretty-prints its output to HTML files, allowing for a quick and convenient scan.\r\n\r\n## Common Strategies \r\n\r\n### Expected Move > Earning's Effect Estimate\r\n\r\n- Gain from Gamma Crush\r\n- Selling CSP\r\n- Selling Straddles and Strangles\r\n- Iron Condor or Butterfly\r\n\r\n### Expected Move < Earning's Effect Estimate even accommodating Gamma Risk\r\n\r\n- Buying Undervalued Options\r\n- Buying Spreads\r\n\r\n<br></br>\r\n\r\n## Quick Start\r\n\r\n<strong> Functions return pandas DataFrame unless specified elsewise </strong>\r\n\r\n### Today_Data\r\n\r\n```python\r\nimport earningstrats.today_data as td\r\n\r\n\"\"\" \r\nReturns tuple of today AMC and tomorrow BMO companies' put option chain and historical earnings price effect\r\nChange days_added to shift day by that much. Customize minimum volume sum and stock price\r\n[0] - OTM Put option Chain\r\n[1] - Historical earnings price effect = Change period to change how far back historical price effect shows\r\nOutputs to today_companies.html, today_options.html, today_price_effect.html\r\n\"\"\"\r\ntd.check_today(period = \"5y\", day_shift = 0, min_vol_sum = 3000, min_stock_price = 10)\r\n\r\n```\r\n### Earnings\r\n\r\n```python\r\nimport earningstrats.earnings as ea\r\n\r\n\"\"\"\r\nGet a stock's historical earnings price effect. Calculates earnings effect from market close -> next day open and next day close\r\nChange period to change how far back historical price effect shows\r\n\"\"\"\r\nea.get_stock_earnings_price_effect(symbol, period = \"5y\")\r\n\r\n\r\n\"\"\"\r\nGet all the stocks with earnings today AMC or tomorrow BMO\r\n\"\"\"\r\nea.get_companies_with_earnings_today_AMC_or_tomm_BMO(day_shift = 0, min_vol_sum = 3000, min_stock_price = 10)\r\n\r\n```\r\n\r\n### Options\r\n\r\n```python\r\nimport earningstrats.options as opd\r\n\r\n\r\n\"\"\"\r\nGet Expected Move for a stock for the earliest option deadline. Returns tuple\r\n[0] - IV Expected Move\r\n[1] - ATM Straddle Expected Move\r\n[2] - ATM Straddle + 1st Strangle Expected Move\r\n[3] - Aggregate Estimate of Stock Expected Move (Used in calculations)\r\n\"\"\"\r\nopd.get_expected_move(symbol)\r\n\r\n\r\n\"\"\"\r\nGets the put option chain. Defaults to finding only OTM puts. Set price_ceiling to set cutoff \r\nContains the Gaussian probability of option being assigned as well as the expected moves of a stock\r\n\"\"\"\r\nopd.get_put_option_chain(symbol, price_ceiling = -1)\r\n\r\n\r\n# Get current stock price of stock\r\nopd.get_current_stock_price(symbol)\r\n\r\n# Get days left until earliest option expiration\r\nopd.get_days_to_expiration(symbol)\r\n\r\n# Get the earliest expiration option chain\r\nopd.get_earliest_deadline_options_chain(symbol)\r\n\r\n# Get the entire put option chain\r\nopd.get_all_put_options(symbol)\r\n\r\n```\r\n\r\n### Option_Set\r\n```python\r\nimport earningstrats.option_set as ops\r\n# Returns a set of stocks with weekly options\r\nops.get_stocks_with_weekly_options()\r\n\r\n# Returns a set of stocks with options\r\nops.get_stocks_with_options()\r\n\r\n```\r\n\r\n## License\r\n\r\nearningstrats is distributed under the Apache Software License. See the LICENSE file in the release for details\r\n\r\n",
"bugtrack_url": null,
"license": "Apache License",
"summary": "Use Stock Earnings Data to formulate strategies",
"version": "0.1.6",
"split_keywords": [
"pandas",
"yahoo finance",
"earnings",
"gamma",
"options"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "4f66e97066d77115c176672fdfc4feb0",
"sha256": "dd05bdb6012b02961bf717be4dd765fb66f9966cfaf5c79af07263e80af36938"
},
"downloads": -1,
"filename": "earningstrats-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "4f66e97066d77115c176672fdfc4feb0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 100871,
"upload_time": "2022-12-20T20:27:27",
"upload_time_iso_8601": "2022-12-20T20:27:27.432874Z",
"url": "https://files.pythonhosted.org/packages/83/56/c4ee1ddb10208e12a9679959fb495d97987fb403727f104d0ac7ef88016d/earningstrats-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-20 20:27:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "woojuyim",
"github_project": "earningstrats",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": [
[
"==",
"1.22.4"
]
]
},
{
"name": "pandas",
"specs": [
[
"==",
"1.4.2"
]
]
},
{
"name": "scipy",
"specs": [
[
"==",
"1.8.1"
]
]
},
{
"name": "yahoo_fin",
"specs": [
[
"==",
"0.8.9.1"
]
]
},
{
"name": "yfinance",
"specs": [
[
"==",
"0.1.70"
]
]
}
],
"lcname": "earningstrats"
}