Commit Graph

1008 Commits

Author SHA1 Message Date
didierlopes.eth
2cb229f35e Fix a bunch (#1852)
* spacing before and after rich tables

* fix menus to have standard UI

* fix tests

* fix tests

* fix tests
2022-05-21 16:57:39 +01:00
James Maslek
25d45d5458 Deprecate stocks/dps/volexch (#1840)
* comment out broken function

* unused import

* Fix tests + comment out removed functions

* lint
2022-05-19 14:50:54 -04:00
didierlopes.eth
0e3b62e143 Portfolio improvements (#1818)
* improve portfolio controller

* improve menu ux with disabling command when port or bench are not loaded

* allow custom reset with benchmark and portfolio loaded

* bench needs portfolio loaded to use start date, reflect that

* fix tests

* allow to see sum of a portfolio holdings

* add r-square to portfolio

* add skewness of data

* add kurtosis

* add stats

* allow perf command to select a period

* add yearly returns to cumulative return plot

* add individual rolling volatility

* add individual rolling sharpe

* add individual rolling sortino

* add individual rolling beta

* add period to cumulative returns

* clean up on aisle 5

* minor fix

* add volatility, sharpe ratio, sortino ratio and maximum drawdown ratio

* remove duplicated metrics

* check for portfolio and benchmark more modular

* fix tests

* remove sqrt(N) and N from sharpe and sortino calculations

* allow hold to export raw data from tail

* automatically add space before and after table

* add portfolio holdings in percentage

* fix relative dates to be more accurate

* refactor metric command to allow to select a metric of interest and check different periods

* fix cumulative return and implement new yearly return command

* add daily returns graph

* add distribution of daily returns command

* add monthly returns command

* add summary command with multiple metrics for a specific period

* calculate yearly (out)performance

* fix show

* rbeta with benchmark of 1

* improve mret style

* improve title of distribution

* improve volatility

* minor improvement in doc

* improve mret and yret

* tests

* update portfolio content on hugo docs

* fix ycrv hugo docs

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* Update _index.md

* fix issue

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-05-19 14:26:37 +01:00
montezdesousa
4f692f26e6 Feature/yieldcurve (#1734)
* Adds yield curves

* Adds yield curves for several countries

* Adds yield curves for several countries

* Adds yield curves for several countries

* Adds yield curves for several countries

* Adds yield curves for several countries

* ycrv plots by default

* Limits source choices and renames raw columns

* Fix test

* Fix test

* lint

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-05-18 00:42:29 +01:00
Lefteris Platis
54a1b6f545 Feature/hedge (#1768)
* [Bug] Incorrect log for reddit keys. #1733 fix

* Create new feature-hedge

* Significantly improve code of hedge menu

* More robust

* Robustness

* Fix tests

* Fix can't multiply sequence by non-int of type 'numpy.float64' error

* Temporary fix of singular matrix error. Return first feasible solution

* Update Hugo Documentation

* Combining menus and cleaning up code

* Tidy up call_exp

* Update tests Round 1

* Update tests Round 2

* Fix linting error

* Fix linting?

* Fixed glitch

Co-authored-by: JerBouma <jer.bouma@gmail.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: colin99d <colin99delahunty@gmail.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-05-14 13:27:26 +01:00
Jeroen Bouma
7e37ed0444 Add comparisons between the portfolio and benchmark including an orderbook sheet (#1773)
* Add in Portfolio Holdings for Attribution functionality

* Update a whole bunch

* Small bugfix and linting

* Remove print statements

* Update Excel to match Yahoo Finance categorization

* Make sure portfolio and benchmark are aligned

* Add in benchmarks, robustness and bugfixing

* Improve the spreadsheet

* Add in allocation model and improve portfolio features

* Bugfixing and more equities in the template

* Bugfix

* Bugfixing

* Add tests and website stuff

* WORK

* Clean up the code

* Add back in terminal changes

* Missing an enter imo

* Documentation fix

* Small fix

* Change code because tests cant handle formatting

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-05-14 12:42:01 +01:00
James Maslek
c69e14a5ca Improve main terminal menu + small alignments (#1813)
* random spacing

* add m

* Add context descriptions to main terminal menu

* clean up forex alignment

* lint
2022-05-13 01:54:58 +01:00
didierlopes.eth
2e45f72482 OpenBB Terminal blended signature (#1806)
* bring dashboards and reports menus one step above

* remove checkpoints

* blend openbb terminal signature

* linting

* update gitignore

* fix crypto dd tests
2022-05-12 16:11:26 +03:00
didierlopes.eth
37ea3fd6a3 Reports and Dashboards to be one level above (#1805) 2022-05-12 12:35:36 +01:00
jose-donato
24cf4a4b4d fix 1756 (#1801)
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-05-12 03:18:51 +01:00
Szymon Błaszczyński
33a041e5bf Trading hours stock feature (#1697) 2022-05-11 19:51:03 +01:00
Minha, Jeong
665ed8810b change view_vwap to specify date range (#1790)
* change view_vwap to specify date range

* test code change due to last commit

* check end for calling end.date()

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-05-11 10:57:29 +01:00
Colin Delahunty
9068ad0124 Refactored Crypto Tests (#1743)
* Refactored tests

* Removed unused command

* Added tests

* Tests : remove cassettes files + add fixture

* Black

* Tests : skip tests

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-05-10 23:32:09 +02:00
James Maslek
d3c4919993 Add stock fundamentals from polygon (#1774)
* Add polygon to fundamentals

* Update fa menu text

* Update fa menu text

* tests for _model

* wording/lint

* _view tests

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-05-09 19:07:11 -04:00
Theodore Aptekarev
2ce3fe460b Fix bugs, remove feargeed and improve help messages (#1767)
* Fix defi lending and borrowing (test_crypto_defi.openbb)

* Update Defi test data

* Remove cnn feargreed command from economy menu

* Fix stocks/ba integration tests

* Fix whale alert redirects blocking the keys menu

* Add failed request handling to whale alert command

* Remove feargreed from hugo

* Remove feargreed from bot

* Warn that portfolio optimization can take a long time

* Remove feargreed from project deps

* Update welcome message

* Update requirements txt

* Fix welcome message test

Co-authored-by: piiq <piiq@tinag.ru>
2022-05-05 18:18:58 +03:00
didierlopes.eth
30d657b50d Improves PO controller from UX perspective (#1760)
* improve portfolio optimization UX

* fix custom_reset and styling color and rmv add/rmv commands

* fix tests

* allow -h in load and file
2022-05-04 10:53:19 +01:00
Colin Delahunty
4d62b262a2 Add Logger Tests (#1707)
* Added openbb_terminal/logger tests

* Added tests for path_tracking

* Just in case lol

* Finished test_directories

* Added more tests

* Fixed flake8 error

* Fixed flake8 error

* Coverage for test_expired_files

* Added handling for no boto3

* Added test mock

* Added test mock

* Added fix

* Test fix

* Fix for windows

* Added int

* More tests

* Added fixes

* Fixed black issues

* Tests : update fixture examples

* Tests : core/log/generation

* Core : log/generation

* replaced conftest delete with temp_path

* Fixed mocks

* refactored get settings to use tmp_path

* reverted codespell

* Making random faillign test linux only

* Swapped to fixture

* Fixed conftest

* Logs collection : add docstring + clean lines

* Tests : fix windows specific issue

* Tests : skip unsound tests which changes logger state

* Black

* Linting

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-05-04 01:00:25 +02:00
alexferrari88
6b4987f3da Allow exporting from stocks/ca/hcorr (#1759)
* Add export to call_hcorr

* Add export_data to display_correlation

* Fix linting

* Fix test for yahoo_finance_view.display_correlation

Co-authored-by: Alex Ferrari <a.ferrari88@gmail.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-05-03 19:21:28 +03:00
jmaslek
7d55b6fe76 Polygon stock load (#1757)
* Add in polygon stock load

* Add in tests for polygon stock load

* Add in a `codes` command to get IDs from polygon

* Add controller + website content

* update test

* didier - you still a pain

* oops

* this is what happens with your import request

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-05-03 16:41:49 +01:00
didierlopes.eth
b7f8fbe630 Improve OpenBB API for investment research reports (#1753)
* fix darkpool api

* fix typo

* add default params on RSI ta

* fix ta models for stocks api

* fix ta models for stocks api

* improve API

* improve API

* test_finbrain updated

* fix finbrain model api

* ba controller

* improve API

* minor improvs to API

* a newly fantastic equity report

* fixed image issue

* add help to tier in finra command

* make export to default to False for API use

* remove ipynb_checkpoints

* remove extra file

Co-authored-by: jose-donato <zmcdonato@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-05-03 16:44:12 +03:00
Riskfolio
34bc290dde New portfolio optimization menu (#1642)
* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* Update _index.md

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* configure portfolio optimization parameters ini

* minor improvement

* Revert "New-Portfolio-Optimization-Menu"

This reverts commit b4b7169cfb.

* Add in Excel functionality and improve the capabilities

* Add Excel load function

* Tidying up the functions

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* Re-add my code

* Some spacing and details

* Add folder structure for portfolio

* Update terminal file loading

* New-Portfolio-Optimization-Menu

* Make it possible to move from params to po with loaded file

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* Making the connection between the parameters file and the functions

* Add in allocation and new params files

* Improve params default settings

* New-Portfolio-Optimization-Menu

* Update Portfolios and Params sheets

* Update sheets

* Update command to load in correct sheet

* Adjust function to only read specific columns

* Update portfolio

* Small correction

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* Patched up show error

* Add Equity portfolio

* Make functions more robust

* New-Portfolio-Optimization-Menu

* New-Portfolio-Optimization-Menu

* Add in Params documentation

* Fixing Linting

* Add in Requirements and Poetry Updates

* Update website

* linting

* Update tests

* Minor fix

* remove unneccesary READMEs

* Remove expected variable type

* Improve documentation

* Clean up the code

* Refractoring

* Adjust names to make it OS friendly

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: jmaslek <jmaslek11@gmail.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2022-05-03 13:54:01 +02:00
jose-donato
e3cd8adf73 Add Messari crypto dd commands (#1711) 2022-05-02 22:21:19 +01:00
Avani Sharma
b73e09119d Adding stock price comparison via -c flag (#1745)
* adding stock price comparison via -c flag

* updated as per comments

* trying to fix tests

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-05-02 10:19:41 +01:00
jbushago
e2e4288254 Add command to determine Reddit sentiment about a ticker/company. (#1744)
* Add API for Reddit sentiment command.

* Add helper functions for Reddit sentiment command.

* Add implementation of Reddit sentiment command.

* Update BA tests to include reddit_sent.

* Add documentation for reddit_sent.

* Add link to reddit_sent from main.yml.

* Refactor get_sentiment in order to avoid globals and make empirical scaling more obvious.

* Add default arguments to Reddit sentiment functions.

* Add option to display raw sentiment values in reddit_sent command.

* Add external axis to reddit_sent command.

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-04-28 12:08:44 +03:00
minhhoang1023
e59a30b188 Add crypto DD commands (#1710)
* Add github activity over time

* Create tests

* Update default days in chart command

* Add san package to poetry

* Fix tests failed

* Generate fixtures

* Fix tests failed

* Remove sanpy package and use requests instead

* Adjust index

* Add hugo server

* Fix datetime

* Update tests

* Revert "Update tests"

This reverts commit ffe03a7224.

* Fix tests

* Regenerate cassettes & filter api tokens

* Fix windows issues

* Fix PR comments

* Pass tests & fix comments
2022-04-27 19:49:30 +07:00
Theodore Aptekarev
53049003f2 Fix user path (#1737)
* Decouple export path composition into a separate function

* Fix typos, linting and text formatting

* Improve cross platform compatibility of user home path handling

* Fix export path for pir and dcf

* Remove excessive iteration from fa integration test

* Add investpy data to fix funds menu

* Clean up logs dir before build on macOS

* De-quarantine terminal package on launch on macOS

* Add docstring

* Update dcf test data

* Remove recording new data every time pycoingecko tests run

* Skip pycoingecko tests

* Update deps to fix CI tests on main

* Bump Pygments version to fix the CI

Co-authored-by: piiq <piiq@tinag.ru>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-04-26 14:48:28 +03:00
Colin Delahunty
690625f11d fixed spelling (#1739) 2022-04-25 11:21:19 -04:00
jose-donato
d06fe1bfea Fix crypto load (#1715)
* updated load crypto

* update load

* updated tests

* updated load

* Update Crypto map

* Suppress warnings

* Update crypto load

* Remove market cap column if it's not in columns

* Fix tests failed

* Fix Coingecko load not working

* Fix tests

* Fix linting

* Fix tests failing

Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
Co-authored-by: Minh Hoang <nminh.hoang1023@gmail.com>
Co-authored-by: jmaslek <jmaslek11@gmail.com>
2022-04-25 18:55:40 +07:00
jose-donato
05c0ea0d8f Adds ross index (#1723)
* added rossidx

* added command to obb script

* horizontal + wrap

* separate charts

* updated commands

Co-authored-by: jmaslek <jmaslek11@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-04-22 10:00:10 +01:00
jmaslek
15501940e5 Add performance table on load (#1724) 2022-04-21 08:28:10 -04:00
jmaslek
893e68efdc Fx forward rates (#1721) 2022-04-20 11:56:02 -04:00
Colin Delahunty
8994168e45 openbb_terminal tests: coverage (61% -> 65%) (#1664)
* Attempting more tests

* Began adding tests

* Added keys controller tests

* Added tests for settings and econometrics controller

* Prevented tests from changing .env files

* Fixed issues with tests

* Added econometrics tests

* fixed pylint issues

* Added folder

* Added QA tests

* Fixed qa tests

* Fixed qa tests

* Fixed tests

* Removed skip

* Added mock to tests

* Update helper_funcs.py

Fix any windows path issues

* Update helper_funcs.py

oops forgot import lol

* Skipped display_hist

* expanded tests

* Maybe mocked matplotlib everywhere

Co-authored-by: teh_coderer <me@tehcoderer.com>
2022-04-19 20:44:15 -04:00
Marcelo Litovsky
f0911fa75f Tests for Coinbase broker functions (#1696)
* Added check for valid Coinbase product, including delisted checking (such as XRP)

* Added check for valid Coinbase product, including delisted checking (such as XRP)

* Pytests for coinbase broker functions

* Pytests for coinbase broker functions

* Pytests for coinbase broker functions

* Update test_coinbase_model.py

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-04-16 21:07:39 -04:00
northern-64bit
fd2839c913 Adding everything from Risk Metrics PR based on new main branch (#1666) 2022-04-15 11:38:37 +01:00
teh_coderer
07c053fcff Bots plots refactor.. 90% html size decrease! (#1686)
* update

* init

* req

* fix

* req

* meh

* updates

* syspath

* update

* local plotly, and scope logic

* refactor

* oops typo

* plot dpi fixes

* fix tests

* fix

* poetry update, reqs

* some adjustments

* added plot settings for scat/options

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-04-15 10:41:17 +01:00
Guan Quan
73187d9e17 Add cost to borrow of stocks. Data from IBKR (#1663)
* add ctb to dps

* add test for ctb

* reformat using black

* fix tests for ctb

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
Co-authored-by: jmaslek <jmaslek11@gmail.com>
2022-04-14 20:27:34 -04:00
jose-donato
a12e0946da Starts crypto tools menu (#1668)
* started crypto tools menu

* allow zero float

* added obb script

Co-authored-by: Chavithra <chavithra@gmail.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
2022-04-14 14:24:42 +07:00
jose-donato
670402396e Replaces coingecko deprecated commands (#1650)
* removes cgproducts and cgplatforms and replaces with cr

* add ignore word

* added .openbb script

* reverted crypto change

* doc

* failing tests

* trying chart and fixed minh issues

* Create barh

* Fix ticker labels

* fix test

* loanscan mock

* defi test

* defi test

* Fix defi test

Co-authored-by: Minh Hoang <nminh.hoang1023@gmail.com>
Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
2022-04-13 11:12:54 +07:00
Colin Delahunty
617266ae21 Closing in on 90% Bot Coverage (#1646)
* Attempting more tests

* fix bots module not found issue

* try this syspath

* black

* fix except

* fix import sys path errors

* remove dual import

* Basic tests

* Sorry Juan

* Seperate discord commands

* fix path issues loading cmds folder

* click dep fix

* Fixed pylint

* Expanded tests

* Expanded tests

* Improve imports

* improve paths, clean up ext load, fixes

* Update pyproject.toml

* resolving windows test issues

Co-authored-by: teh_coderer <me@tehcoderer.com>
2022-04-10 22:07:07 +01:00
jose-donato
ea894651c8 updated anchor command to display earnings (#1661)
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-04-10 20:46:21 +01:00
Artem Veremey
78b724e823 Add a pytest.mark.linux to test_display_defi_tvl (#1665) 2022-04-10 15:03:08 +01:00
Artem Veremey
427cc17252 Add pytest.mark.linux to test_plot_oi (#1662)
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
2022-04-08 22:00:18 -07:00
jose-donato
5bf4618b39 Adds QA and Pred to forex (#1652)
* added qa and pred to forex

* updated test help

* Add forex/qa notebooks api wrapper

* Add forex/qa tests

* Add all menu commands to the integration test script

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-04-08 21:03:36 +03:00
minhhoang1023
b4e44d23d0 Update test documentation (#1630)
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-04-04 22:15:05 +03:00
jose-donato
01391c2564 New Open Source menu (#1603)
* adds os menu

* remove tests

* fixed tests

* fixed date in sh

* updated alt controller tests

* updated api fecthing/handling

* lint

* updated website folder name and tests

* alt tests

* tests

* tests

* keys for github

* updated tests

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-04-04 19:08:50 +03:00
Colin Delahunty
826cd8a723 Add tests for bots/stocks (#1616)
* Added test_quote

* Added dps tests

* Added more tests

* Added government tests

* Added insider tests

* Added options tests

* Added sia tests

* Added ta tests

* Readd coverage rc

* Added test
2022-04-03 21:13:14 -04:00
didierlopes.eth
1e24d02e1e Powerful stock search (#1617)
* improve stock search dramatically

* docs

* Update _index.md

* fix tests

* black formatter

* fix tests, some...

* Tests : Fixing stocks>stocks_controller

* Tests : Fixing stocks>stocks_helper

Co-authored-by: Chavithra <chavithra@gmail.com>
2022-04-03 16:20:20 +01:00
Colin Delahunty
6538c0ce14 Expanding bot tests (#1561)
* Expanding bot tests

* expanded tests

* Added tests

* Added stock test

* Fix filepath

* Attempted mock

* Bots : test_run_telegram

* Enhance tests

* Fixed black

* Expanded tests

* Added fix

* Ingore interactive files

* Removed bot dependency installation from tests

* Fix one black

* Fixed black

* Added init.py

* Added pylint disables

* Added skip

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-04-02 14:47:46 -04:00
Chavithra
9d33f638f1 Renaming GamestonkTerminal (#1596) 2022-03-30 13:14:00 +02:00
Artem Veremey
b7d30c22dd Updating dependencies and putting kaleido into a shibajail (#1592)
* Updating dependencies and putting kaleido into a shibajail

* Downgrading jinja2 to accomodate papermill

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-03-29 12:26:12 -07:00