mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
Rename gr_hist command to grhist (#585)
* rename grhist command * Update README.md
This commit is contained in:
8
gamestonk_terminal/options/README.md
vendored
8
gamestonk_terminal/options/README.md
vendored
@@ -26,7 +26,7 @@ This menu aims to give insight on options. Options can cause significant share p
|
||||
* Plot volume and open interest
|
||||
* [hist](#hist)
|
||||
* Plot option history [Source: Tradier.com]
|
||||
* [gr_hist](#gr_hist)
|
||||
* [grhist](#grhist)
|
||||
* Plot historical option greek [Source: ops.syncretism.io]
|
||||
|
||||
|
||||
@@ -184,11 +184,11 @@ Note that the chain ID can be obtained by using `chains -d symbol`
|
||||

|
||||
|
||||
|
||||
## gr_hist <a name="gr_hist"></a>
|
||||
## grhist <a name="grhist"></a>
|
||||
Plot historical option greeks. Data from ops.syncretism.io
|
||||
|
||||
```python
|
||||
usage: gr_hist [-s STRIKE] [--put] [-g {iv,gamma,theta,vega,delta,rho,premium}] [--chain CHAIN_ID] [--raw] [--export {csv,json,xlsx}] [-h]
|
||||
usage: grhist [-s STRIKE] [--put] [-g {iv,gamma,theta,vega,delta,rho,premium}] [--chain CHAIN_ID] [--raw] [--export {csv,json,xlsx}] [-h]
|
||||
```
|
||||
* -s/--strike: Strike to show history for
|
||||
* -g/--greek: Greek to get data for. Can be {iv,gamma,theta,vega,delta,rho}. Also can be premium
|
||||
@@ -198,6 +198,6 @@ usage: gr_hist [-s STRIKE] [--put] [-g {iv,gamma,theta,vega,delta,rho,premium}]
|
||||
* --export: Export file. Can be {csv, json, xlsx}.
|
||||
|
||||
```python
|
||||
(✨) (op)> gr_hist -s 145 --put -g delta
|
||||
(✨) (op)> grhist -s 145 --put -g delta
|
||||
```
|
||||

|
||||
|
||||
@@ -47,7 +47,7 @@ class OptionsController:
|
||||
"oi",
|
||||
"hist",
|
||||
"chains",
|
||||
"gr_hist",
|
||||
"grhist",
|
||||
]
|
||||
|
||||
def __init__(self, ticker: str):
|
||||
@@ -97,7 +97,7 @@ class OptionsController:
|
||||
print(" vol plot volume [Tradier/YF]")
|
||||
print(" voi plot volume and open interest [Tradier/YF]")
|
||||
print(" hist plot option history [Tradier")
|
||||
print(" gr_hist plot option greek history [Syncretism]")
|
||||
print(" grhist plot option greek history [Syncretism]")
|
||||
print("")
|
||||
|
||||
def switch(self, an_input: str):
|
||||
@@ -243,7 +243,8 @@ class OptionsController:
|
||||
options.calls, options.puts, self.ticker, self.selected_date, parsed
|
||||
)
|
||||
|
||||
def call_gr_hist(self, other_args: List[str]):
|
||||
def call_grhist(self, other_args: List[str]):
|
||||
"""Process grhist command"""
|
||||
syncretism_view.historical_greeks(self.ticker, self.selected_date, other_args)
|
||||
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ def historical_greeks(ticker: str, expiry: str, other_args: List[str]):
|
||||
parser = argparse.ArgumentParser(
|
||||
add_help=False,
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
prog="gr_hist",
|
||||
prog="grhist",
|
||||
description="Plot historical option greeks.",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user