mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 04:31:13 +00:00
Fixes Forex Quote (#2350)
* Fixed bug * Started fixing codespell * Fixed more codespell * Updated local codespell * More codespell fixes * More codespell fixes * Fixing test
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
- run: pip install types-pytz types-requests types-termcolor types-tabulate types-PyYAML types-python-dateutil types-setuptools types-six
|
||||
- run: bandit -x ./tests -r . || true
|
||||
- run: black --diff --check .
|
||||
- run: codespell --ignore-words-list=zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,vie,hel --quiet-level=2 --skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,./build/pyinstaller
|
||||
- run: codespell --ignore-words-list=commun,ro,zar,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat,vie,hel --quiet-level=2 --skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,./build/pyinstaller
|
||||
- run: flake8 . --count --ignore=E203,W503 --max-line-length=122 --show-source --statistics --exclude ./build/pyinstaller
|
||||
- run: mypy --ignore-missing-imports --exclude="/setup\.py$" .
|
||||
- run: shopt -s globstar && pyupgrade --py38-plus **/*.py
|
||||
|
||||
4
.pre-commit-config.yaml
vendored
4
.pre-commit-config.yaml
vendored
@@ -32,13 +32,13 @@ repos:
|
||||
- id: flake8
|
||||
entry: flake8 --ignore=E203,W503 --max-line-length=122 --exclude ./build/pyinstaller/*
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.1.0
|
||||
rev: v2.2.0
|
||||
hooks:
|
||||
- id: codespell
|
||||
entry: codespell
|
||||
args:
|
||||
[
|
||||
"--ignore-words-list=vie,hel,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat",
|
||||
"--ignore-words-list=commun,ro,zar,vie,hel,zlot,ba,buil,coo,ether,hist,hsi,mape,navagation,operatio,pres,ser,yeld,shold,ist,varian,datas,ake,creat",
|
||||
"--quiet-level=2",
|
||||
"--skip=./tests,.git,*.css,*.csv,*.html,*.ini,*.ipynb,*.js,*.json,*.lock,*.scss,*.txt,*.yaml,build/pyinstaller/*",
|
||||
]
|
||||
|
||||
2
openbb_terminal/README.md
vendored
2
openbb_terminal/README.md
vendored
@@ -378,7 +378,7 @@ There are a few things that still don't work, and you can see what works and wha
|
||||
poetry install
|
||||
```
|
||||
|
||||
11. Ready to rock on a Raspbery Pi!
|
||||
11. Ready to rock on a Raspberry Pi!
|
||||
|
||||
```bash
|
||||
python terminal.py
|
||||
|
||||
@@ -570,7 +570,7 @@ def get_wsb_community(
|
||||
def get_due_dilligence(
|
||||
ticker: str, limit: int = 5, n_days: int = 3, show_all_flairs: bool = False
|
||||
) -> List[praw.models.reddit.submission.Submission]:
|
||||
"""Gets due dilligence posts from list of subreddits [Source: reddit]
|
||||
"""Gets due diligence posts from list of subreddits [Source: reddit]
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
@@ -167,7 +167,10 @@ def get_unitroot(
|
||||
# Wrap this in catch_warnings to prevent
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
res2 = kpss(data, regression=kpss_reg, nlags="auto")
|
||||
try:
|
||||
res2 = kpss(data, regression=kpss_reg, nlags="auto")
|
||||
except ValueError:
|
||||
return pd.DataFrame()
|
||||
vals2 = [res2[0], res2[1], res2[2], "", ""]
|
||||
data["KPSS"] = vals2
|
||||
return data
|
||||
|
||||
@@ -63,7 +63,7 @@ INDICES = {
|
||||
"se_omx30": {"name": "OMX Stockholm 30 Index (SEK)", "ticker": "^OMX"},
|
||||
"se_omxspi": {"name": "OMX Stockholm All Share PI (SEK)", "ticker": "^OMXSPI"},
|
||||
"se_benchmark": {"name": "OMX Stockholm Benchmark GI (SEK)", "ticker": "^OMXSBGI"},
|
||||
"dk_benchmark": {"name": "OMX Copenhagen Benchamrk GI (DKK)", "ticker": "^OMXCBGI"},
|
||||
"dk_benchmark": {"name": "OMX Copenhagen Benchmark GI (DKK)", "ticker": "^OMXCBGI"},
|
||||
"dk_omxc25": {"name": "OMX Copenhagen 25 Index (DKK)", "ticker": "^OMXC25"},
|
||||
"fi_omxh25": {"name": "OMX Helsinki 25 (EUR)", "ticker": "^OMXH25"},
|
||||
"de_dax40": {"name": "DAX Performance Index (EUR)", "ticker": "^GDAXI"},
|
||||
|
||||
@@ -39,7 +39,11 @@ def display_quote(to_symbol: str, from_symbol: str):
|
||||
)
|
||||
return
|
||||
|
||||
df = pd.DataFrame.from_dict(quote)
|
||||
try:
|
||||
df = pd.DataFrame.from_dict(quote)
|
||||
except ValueError:
|
||||
console.print(f"[red]{quote['Information']}[/red]\n")
|
||||
return
|
||||
df.index = df.index.to_series().apply(lambda x: x[3:]).values
|
||||
df = df.iloc[[0, 2, 5, 4, 7, 8]]
|
||||
print_rich_table(
|
||||
|
||||
@@ -48,6 +48,6 @@ def print_recommendation(
|
||||
print_rich_table(
|
||||
recom,
|
||||
headers=list(recom.columns),
|
||||
title="Ticker Recomendation",
|
||||
title="Ticker Recommendation",
|
||||
show_index=True,
|
||||
)
|
||||
|
||||
4
routines/example.openbb
vendored
4
routines/example.openbb
vendored
@@ -4,7 +4,7 @@ stocks
|
||||
# Load Palantir Technologies (PLTR)
|
||||
load pltr
|
||||
|
||||
# Enter the Due Dilligence (dd) menu
|
||||
# Enter the Due Diligence (dd) menu
|
||||
dd
|
||||
|
||||
# Show price targets, both the chart and the table
|
||||
@@ -24,4 +24,4 @@ stats
|
||||
fib
|
||||
|
||||
# Return to home
|
||||
/
|
||||
/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
usage: decompose [-m] [--export {csv,json,xlsx}] [-h]
|
||||
```
|
||||
|
||||
This type of forcasting attempts to separate and index factors thought to have meaningful impact on the otherwise random movements in stock prices.
|
||||
This type of forecasting attempts to separate and index factors thought to have meaningful impact on the otherwise random movements in stock prices.
|
||||
|
||||
Decompose time series as:
|
||||
- Additive Time Series = Level + CyclicTrend + Residual + Seasonality
|
||||
|
||||
@@ -22,7 +22,7 @@ optional arguments:
|
||||
Example:
|
||||
```
|
||||
2022 Feb 16, 11:31 (✨) /stocks/ta/ $ recom
|
||||
Ticker Recomendation
|
||||
Ticker Recommendation
|
||||
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━┳━━━━━━┳━━━━━━━━━┓
|
||||
┃ ┃ RECOMMENDATION ┃ BUY ┃ SELL ┃ NEUTRAL ┃
|
||||
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━╇━━━━━━╇━━━━━━━━━┩
|
||||
|
||||
6
website/content/terminal/crypto/dd/_index.md
vendored
6
website/content/terminal/crypto/dd/_index.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Introduction to Cryptocurrency Due Dilligence
|
||||
keywords: "cryptocurrency, dd, due dilligence, tokenomics, overview, bitcoin"
|
||||
excerpt: "An Introduction to Cryptocurrency Due Dilligence, within the Cryptocurrency Menu,
|
||||
title: Introduction to Cryptocurrency Due Diligence
|
||||
keywords: "cryptocurrency, dd, due diligence, tokenomics, overview, bitcoin"
|
||||
excerpt: "An Introduction to Cryptocurrency Due Diligence, within the Cryptocurrency Menu,
|
||||
with a brief overview of the features."
|
||||
geekdocCollapseSection: true
|
||||
---
|
||||
|
||||
@@ -8,7 +8,7 @@ geekdocCollapseSection: true
|
||||
|
||||
The Cryptocurrency Decentralized Finance (DeFi) menu gives the user the ability to delve deeper into Uniswap statistics (<a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/tokens/" target="_blank">tokens</a>, <a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/stats/" target="_blank">stats</a> and <a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/pairs/" target="_blank">pairs</a>),
|
||||
information about dApps (<a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/gdapps/" target="_blank">gdapps</a> and <a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/stvl/" target="_blank">stvl</a>)
|
||||
as well as infomration about terra blockchain (<a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/sreturn/" target="_blank">sreturn</a>) and luna (<a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/lcsc/" target="_blank">lcsc</a>).
|
||||
as well as information about terra blockchain (<a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/sreturn/" target="_blank">sreturn</a>) and luna (<a href="https://openbb-finance.github.io/OpenBBTerminal/terminal/crypto/defi/lcsc/" target="_blank">lcsc</a>).
|
||||
|
||||
## How to use
|
||||
|
||||
|
||||
2
website/content/terminal/stocks/dd/_index.md
vendored
2
website/content/terminal/stocks/dd/_index.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Introduction to the Due Diligence Menu
|
||||
keywords: "dd, due, diligence, dilligence, research, company, ticker, analyst, rating, rot, pt, est, sec, supplier, customer, arktrades, ratings, analysts, filings, form, forms, customers, suppliers"
|
||||
keywords: "dd, due, diligence, research, company, ticker, analyst, rating, rot, pt, est, sec, supplier, customer, arktrades, ratings, analysts, filings, form, forms, customers, suppliers"
|
||||
date: "2022-06-01"
|
||||
type: guides
|
||||
status: publish
|
||||
|
||||
@@ -5,7 +5,7 @@ usage: fraud [-h] [-d] [-e] [--export {csv,json,xlsx}]
|
||||
```
|
||||
optional arguments:
|
||||
-e, --explanation whether to show the description for the metrics (default: false)
|
||||
-d, --detail show detials on the calculation of mscore
|
||||
-d, --detail show details on the calculation of mscore
|
||||
-h, --help show this help message
|
||||
--export {csv,json,xlsx}
|
||||
Export raw data into csv, json, xlsx
|
||||
|
||||
@@ -14,7 +14,7 @@ For example, if you assume the price of AAPL has an equal chance
|
||||
of finishing at $100 or $200 for a given expiration, you could use
|
||||
this to value an option at that expiration. To value a call with a
|
||||
strike of $150, you would calculate the payoff for each stock price,
|
||||
which would be $0 and $50. Then, we caclulate the weighted average
|
||||
which would be $0 and $50. Then, we calculate the weighted average
|
||||
payoff of $25. We need to divide this amount by the risk-free rate,
|
||||
assumed to be 0.02. So the value of this option expiring in one year
|
||||
is 25/1.02, or $24.51.
|
||||
|
||||
Reference in New Issue
Block a user