Commit Graph

381 Commits

Author SHA1 Message Date
montezdesousa
9ff9d121a8 Rename ecocal to events and fix categories filtering (#2268)
* fix investpy categories filter

* change ecocal to events

* update website doc

* rewrite menu help test

* update menu command description

* update main.yml

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2022-08-08 14:19:33 +01:00
DidierRLopes
32c656b7f0 Remove portfolio optimisation shortcut (#2266)
* bring suffix over to tackle #2257

* remove po shorcut from ca

* remove po shortcut in ca test

* remove po shorcut from remaining places

* fix tests
2022-08-08 11:34:07 +01:00
soggyomelette
824373cad1 Adds santiment to keys menu in response to #2224 (#2238)
* 'Adds santiment key in keys_controller.py and adds tests for santiment and messari keys'

* fix linting

* fix linting

* Fixed \n issue

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: colin99d <colin99delahunty@gmail.com>
2022-08-05 10:53:44 -04:00
Theodore Aptekarev
775d218891 Add parser for input command arguments (The Forward Slash PR) (#2064)
* Add helper command to filter unix paths and other edge cases

* Remove sort argument filtering from parsing

* Make --file arg mandatory for loading files

* Refactor queue parsing logic

* Enable adding controller level input parsing filters

* Remove the github repo path hack because it's not needed anymore

* Fix typos and line length linting

* Update unix path parser to match known extensions

* Update oss custom filters to not require space after slash arg

* Fix tests and failing linters

* Add pre-commit hook to check for reserved arguments validity

* Fix tests

* Fix finviz compare screener tests

* Fix screener test

* Fix screener test

* Fix float representation in pd dataframe on finviz screener tests

* Update test records

* Update test records

* Remove explicit float formatting in tests

* Update tests

* Remove prepending file argument

* Update long arguments that have lost their short default to file

* Update arguments in docs

* Update portfolio test data

* Fix econometrics/desc throwing error on empty df and fix tests

* Update tests

* Fix econometrics load autocompletion

* Fix portfolio tests giving different results every time

* Allow loading openbb scripts from arbitrary path

* Fix passing path as a terminal argument

* Fix guess game being case sensitive

* Silence bandit warning about using pseudo-random generators

* Update gov tests

* Fix screener sort fields that have forward slash

* Make controllers apply custom argument filters on entry

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2022-08-05 12:51:23 +03:00
montezdesousa
1413456bd9 Ecocal improve (#2225)
* fix available countries and title

* fix title

* capitalize headers

* display just one day by default

* default all countries & high imporatnce

* format output

* fix display to standard date yyyy/mm/dd

* rewrite expected ecocal test

* change date format slash to dash

* mypy

* complete description

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
2022-08-04 09:29:47 +01:00
Colin Delahunty
7007e5857c Fixed Jim Cramer (#2246)
* Fixed small issue

* Fixing tests
2022-08-03 16:23:13 -04:00
Theodore Aptekarev
507cbfab39 Small fix (#2240) 2022-08-03 07:48:45 -04:00
Colin Delahunty
7494059fc1 Futures Dashboard (#2188)
* Added futures dashboard

* Got a semi working prototype

* Updated csv

* Improved UI and data gathering

* Got a working prototype

* Updated title

* Added description for futures

* Fixed tests
2022-08-02 08:46:18 -04:00
DidierRLopes
8eed33b62f News from feedparser + Binance API key check fix (#2192)
* fix binance controller API key

* add news to main menu

* feedparser

* trying to help

* requirements for didier

* one test

* fix suggestion by @rpydaneogrendim on Twitter

* fix tests

* trying to help again?

* test

Co-authored-by: james <jmaslek11@gmail.com>
2022-07-29 22:13:45 +01:00
Colin Delahunty
da337abc1c Improved verbosity of dd rating failure, and add color to the chart (#2204)
* Added verbosity to rating failure

* Made rating failure verbose and added color

* Fixed tests
2022-07-29 16:55:14 -04:00
Colin Delahunty
37e2597bb4 Added fixes for coinbase (#2202)
* Added fixes for coinbase

* Fixed tests

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-07-29 19:20:34 +01:00
asymness
d08501894f Add export call to FA key metrics controller (#2184) 2022-07-26 21:07:23 +01:00
James Maslek
64d4f22753 Clenow Volatility Adjusted Momentum (#2180)
* Add this clenow volatility momentum thing

* Hugo + FIx controller

* clean up

* mypy fix

* Add to menu and dont show header

* menu testing

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2022-07-26 13:09:21 -04:00
northern-64bit
9034055c6f Fix portfolio metrics (#2116)
* Fix portfolio metrics

* Linting

* Fix beta calculation and thus jensens alpha

* Fix tests

* Fix linting

* Final linting

* Linting

* Add in table with info about the metrics

* Spelling

* Fixes everything mentioned

* Linting

* Final linting

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-07-26 15:05:01 +02:00
Alex Willis
a768e545a8 Added a Historical Beta Regression Plot (#2145)
* beta function initial commit

* Used pct returns instead of raw returns

* beta function initial commit

* Used pct returns instead of raw returns

* Moved beta from stocks/ca to stocks/qa

* Updated tests for stocks/qa/beta

* Added hugo docs page for stocks/qa/beta

* Updated beta docstrings and added graceful exit on bad ref ticker
2022-07-26 13:23:08 +01:00
jose-donato
cace78c242 Replace crypto exchange apis with CCXT (#2158)
* ccxt added

* updated text

* added docs, tests

* updated requirements

* didier requests
2022-07-26 10:04:44 +01:00
jose-donato
9d0bf694f6 Fix 2099 - add crypto funding rate (#2159)
* added funding rate feature to dd menu

* didier changes

* tests
2022-07-26 00:23:34 +01:00
Jay M Gonzalez
9d6292c7fe fix tokenomics error (#2155)
* fix tokenomics error

* fix tokenomics graph

* add tests

* add black command

* add test helpers

* add test helpers

* trying to fix tests

* trying to fix tests

Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: jose-donato <zmcdonato@gmail.com>
2022-07-25 23:26:02 +01:00
James Maslek
66f05b83c0 Add chains via yahoo finance (#2176)
* Add chains via yahoo finance

* Fix existing tradier  test

* Update chains hugo

* test options controller

* business_insider_view tests

* test yfinance view
2022-07-25 22:47:46 +01:00
DidierRLopes
fea15aa13d Fix stuff (#2150)
* Make sec fillings link clickable in report

* Fix #2130

* styling here and there

* fix crypto panic key output result

* minor styling

* style

* tests

* allow for bitcoin rainbow to go into future

* add 2024 halving

* pylint ignore
2022-07-24 10:38:02 +01:00
northern-64bit
64fcbc6acd Integrating the fmp submenu into the fa menu + plotting + ratios (#2102)
* Moving changes from previous pr to new branch with working tests

* Fix website

* Tests : stocks/fundamental_analysis

* stocks/fundamental_analysis/fa_controller : fix bug

* Fix requested changes

* Fix linting

* Fix warnings

* Linting

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-07-21 09:21:11 +02:00
Theodore Aptekarev
b90025555b Remove defirate scraping (#2113)
* Remove functions based on defirate scraping

* Update docs

* Update tests
2022-07-19 19:40:08 +03:00
montezdesousa
82b6411cab remove cumulative returns functionalities (#2103)
Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-07-18 18:50:59 +03:00
Chavithra
1995344965 Tests : mock api call (#2105) 2022-07-18 17:51:12 +03:00
Jalil F
96ed08daaa [Bugfix#2094] Fix handling of balances when user has no tokens. (#2095)
* Add edge case handlers for crypto balance. Resolves OpenBB-finance/OpenBBTerminal#2094

* Clear print statement.

* Run previous df generation.

* Run pure row merge.

* Fixing spacing.

* Adding test and fixing previous test failures.

* Clear comment.

* Adding vcr test.

* revert to old poetry.lock

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2022-07-17 13:33:16 +01:00
montezdesousa
0f6852cf0c Fixes error message on portfolio menu help (#2088)
* fix message display on help

* rewrite expected on print help

* fix linting
2022-07-15 10:21:02 +01:00
ghbcode
51b6c6ca76 Corrected wording (#2080) 2022-07-13 09:15:12 -04:00
James Maslek
9e7cf49e91 sources goofed (#2079) 2022-07-13 07:44:15 +01:00
DidierRLopes
9e220e8f3c Creates a controller to specify sources (#2069)
* Add all data sources to data_sources_default.json so we can have a list in one place

* create menu to get and set data sources

* improve settings controller

* james request

* improve helper message

* minor improvement

* fix tests
2022-07-12 18:56:52 +01:00
Chavithra
0dfd53f28a Portoflio : add pa export command for Degiro (#2065)
* Portoflio : add pa export command for Degiro

* Update controller + tests

* Tests

* Degiro : update pa export format

* Fixing Premium

* Black

* Show index
2022-07-12 19:38:34 +02:00
montezdesousa
4c0b1135a9 Economic calendar command (#2043)
* add ecocal command to menu

* add menu legend

* run black and pylint

* fix date input

* add command to main.yml

* sort and remove duplicates

* run black on model

* fetch user timezone automatically

* remove tz option and None displays

* adds choices to controller

* fix dates corner case

* create test for get_economic_calendar

* write tests for investingcom_view

* fix ycrv model

* remove unused imports

* rewrite expected for economy print help

* rewrite expected for portfolio model

* fix linting

* fix linting

* try to pass pylint again

* create _index.md

* complete docstrings

* rewrite expected  on portfolio model

* Update _index.md

* Update _index.md

* change -i default to all

* rewrite portfolio model and mark vcr

* run black on test changes

* revert changes on tests

* add limit to nr of events

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-07-12 16:22:48 +01:00
Theodore Aptekarev
5267af2876 Bump python version (#2061)
* Add python 3.9 conda environment

* Bump dependency versions

* Bump default python version in github actions to 3.9

* Update install documentation

* Update tests

* Bump black version in conda environments

* Skip test_display_norm in econometrics menu tests

* Bump black and tensorflow versions in pyproject toml

* Attempt to fix failing concurrent windows tests

* Skip test_display_norm in econometrics menu tests

* Bump python in conda test workflows

* Update requirements.txt

* Fix old version fallback tag
2022-07-12 16:30:59 +03:00
montezdesousa
dfd6d49056 Fixes portfolio_model.py tests (#2071)
* fix portfolio tests

* run black on test file

* remove unused argument
2022-07-12 11:41:59 +02:00
James Maslek
72e2e78ad2 Get rid of datetime and market open closes in default stock load (#2067)
* Get rid of datetime and market open closes in default stock load

* fix portfolio tests
2022-07-11 15:55:26 -04:00
montezdesousa
2c3e10a128 Overhaul Portfolio class (#2021)
* adds pythonic portfolio class

* start calculate trades refactoring

* adds comments to portfolio model - delete afterwards

* finish calculate trades refactoring

* restore original portfolio_model.py

* implement calculate_allocations

* adapt and test controller load, show, bench, alloc and perf

* add old code that was ok

* adapt controller

* adapt portfolio_view

* run black on pythonic_portfolio.py

* fix crypto bug

* change column name in example datasets

* substitute portfolio_model.py

* update show command

* push cumulative returns calculation to model

* fix last change in cumulative returns

* add comments on possibly unused code

* run black on changes

* bring metrics from helper to model

* push rolling metrics from view to model

* Details and linting

* Fix tests

* remove empty attribute and rename class

* fix view and controller rf

* change returns calculation method

* remove CASH from code

* remove cash from tickers_list

* run black on changes

* change function name

* adapt to PortfolioModel

* fix tests

* fix tests on help

* fix linting

* call metrics from PortfolioModel

* call drawdown from model

* fix some mypy issues

* fix remaining mypy issues

* fix test

* Fix linting

* Remove unused function

* Small fixes

* Remove old code and adjust summary to simply work

* Update the Excel since CASH is no longer a thing

* Fix tests

* Update the csvs

* Updates to usage of full_shares and more details

* Fix -t flag for perf

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-07-08 17:59:09 +02:00
James Maslek
d1e97c7ac4 Update data sources json to allow submenu loading (#2057)
* update data sources json

* missed one

* fix test
2022-07-07 19:05:57 +01:00
DidierRLopes
0276784b35 Update defaults.ini (#2035)
* update defaults.ini

* fix arg

* Make arg more robust when you use ini file

* Fix tests

Co-authored-by: JerBouma <jer.bouma@gmail.com>
2022-07-07 13:39:29 +02:00
northern-64bit
89297fadc4 Adding new portfolio metrics (#2029)
* Making pa active + pa minor features

Makes pa actice and adds country to the df. The groupby command also gets percents of holding allocation. It also fixes warnings and prepares for a later pr that I'm currently working on.

* Fix linting

* black linter

* Fixes

Should fix everything

* Linting

* Making pa controller to base class standard

* Fix linting

* first metrics

* Adding calmar ratio

* Adding metrics to controller

* Linting

* Linting

* Test fixes

* Test fixes

* Adding tests

* Linting

* Restructuring added tests

* Linting

* Updating hugo website and fixing help

* Fixing commands

* Fix kelly criterion command

* Fixing tests

* Linting

* More linting

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-07-07 10:14:16 +02:00
Jeroen Bouma
b749d6e3c6 Improvements within the Terminal for the Documentation (#2048)
* Change about us to open_terminal_documentation

* Change the home menu to be more compact

* Make changes to menu layout and change bottom bar

* Change about command to send you to the documentation and add about to bottom bar

* Add in about choices to all menus

* Adjust wording

* Adjust the website to match terminal commands and make adjustments for common menus

* Update the website and small change to about command

* Small adjustment to about command

* Remove update command

* Add some more info about arguments

* Fix broken link

* Add pro tip

* Update keys to work well with about

* Fix some common paths

* Add back in the update command with exception if packaged application

* Remove update comment

* Fix all the things

* Make about more robust and also add in exe

* Make sure that there are actual commands and menus
2022-07-06 13:52:26 +01:00
northern-64bit
5188884105 Crypto api fixes (#1959)
* Making pa active + pa minor features

Makes pa actice and adds country to the df. The groupby command also gets percents of holding allocation. It also fixes warnings and prepares for a later pr that I'm currently working on.

* Fix linting

* black linter

* Fixes

Should fix everything

* Linting

* Making pa controller to base class standard

* Fix linting

* Refactor API to accept Crypto Symbol as an input argument

* Crypto API fixes

* Fixes

* Linting

* Linting

* More linting

* Fixes

* Tests : cryptocurrency/helper

* Tests : cryptocurrency/glassnode

* Pytest : Cryptocurrency/due_diligence

* Pytest : cryptocurrency/discovery

* Pytest : cryptocurrency/due_diligence

* Remove not a needed function argument

* Linting

* Test fixes

* Fixing mentioned fixes

* Test fixes

* Tests: cryptocurrency/defi

* Fix linting

* Final test fixes

Co-Authored-By: Chavithra <6114398+Chavithra@users.noreply.github.com>

* Fix merge

* Linting

* Fixing error

* Linting

* Removed long link

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: Minh Hoang <nminh.hoang1023@gmail.com>
Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: Chavithra <6114398+Chavithra@users.noreply.github.com>
2022-07-06 13:08:32 +01:00
DidierRLopes
3d3ee96874 Remove print and fix issue with str on sia/vis (#2034)
* remove print and fix issue with str on sia/vis

* fix tests

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-07-04 10:08:14 +01:00
DidierRLopes
066d347c63 replace curve brackets by square ones (#2040) 2022-07-03 21:31:04 +01:00
soggyomelette
7849b5668b Adds a test for binance key as asked for in #2006 (#2026)
* Adds a test for binance key as asked for in #2006

* Update keys_controller.py

* Update keys_controller.py

* fixing linting

* fixing tests

* fixing linting

* fix tests

* fix linting

* fix linting

* fix linting

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2022-07-02 12:06:51 +01:00
Paul Symonds
248deed202 New Feature Financial Analysis, checks Yahoo if no data at Alpha Advantage. (#1984)
* Added code to look at Yahoo Finance Financials (Income, Balance sheet and cashflow, if tickers not found in Alpha Vantage.  Should cover all UK (only tested with .L appended to tickers).

* Added code to look at Yahoo Finance Financials (Income, Balance sheet and cashflow, if tickers not found in Alpha Vantage.  Should cover all UK (only tested with .L appended to tickers).

* change

* refactored to keep yahoo fa financials (income, cash, balance) separate.

* refactored to keep yahoo fa financials (income, cash, balance) separate.

* refactored to keep yahoo fa financials (income, cash, balance) separate.

* refactored to keep yahoo fa financials (income, cash, balance) separate (fixed dates).

* Fixed source bug

* empty commit

* fixed header date issue

* Fixed source

* fixed bugs related to no data returned

* fixed bugs related to no data returned

* fixed bugs related to no data returned

* Added yf to av when no data returned from av

* Added support for polygon statement of cash flows

* Fixed issue I created

* fixed pylint error else after return

* fixed pylint error with disable R1732

* fixed tests relating to av

* Updated polygon model and fixed tests

* fixed load GNR in fa after SNR.L in stocks

* fixed load GNR in fa after SNR.L in stocks

* Added newline to print

* Added newlines

Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: colin99d <colin99delahunty@gmail.com>
2022-06-29 14:02:01 -04:00
DidierRLopes
221bfce452 Improve economy menu (#1996)
* slight improvement on the reports controller

* improve economy menu

* fix tests

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-06-29 12:49:00 +01:00
montezdesousa
8f6bd9cab6 Removes command govp from crypto/defi (#1980)
* remove govp from defi menu

* rewrites help txt

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2022-06-25 00:54:14 +01:00
minhhoang1023
7c597befe2 Unify input arguments between Terminal and Crypto API usage (#1942)
* Refactor API to accept Crypto Symbol as an input argument

* Fix tests

* Fix tests 2
2022-06-25 00:02:07 +01:00
James Simmons
2a5fbd4cd5 Fixing default view and ascending order in cglosers and cggainers (#1923)
* Fixing default view and ascending order in cglosers and cggainers

* Fixing futurewarnings error, adding test data, and changing dollar sign issue

* Adding --rewrite-expected test to pass CI

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
2022-06-25 00:01:20 +01:00
soggyomelette
0b9a81b1bd [Bug] Broken ETF functionalities (#1976)
* Update stockanalysis_model.py

* Update etf_controller.py

* Fix tests and linting

Co-authored-by: didierlopes.eth <dro.lopes@campus.fct.unl.pt>
Co-authored-by: JerBouma <jer.bouma@gmail.com>
2022-06-24 23:49:54 +01:00
montezdesousa
2386bd2da2 [Bug] crypto/defi/sratio: Remove scientific notation in Chart title (#1965)
* removes sratio from choices and help

* rewrites help test txt

Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
Co-authored-by: Chavithra <chavithra@gmail.com>
2022-06-24 14:01:13 +01:00