Commit Graph

395 Commits

Author SHA1 Message Date
Om Gupta
3a7401dfd0 Adds relative strength percentile to stocks/ta (#2302)
* Adds relative-strength percentile to stocks/ta

* allow exporting tables

* shifted from common to stocks and added tests

* added documentation

* added in nav bar

* fix test

* remove whitespace in docstring

* fix type error

* fix test

* fix tests

* test

* added tickers to a separate table

* add image to doc

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
2022-08-22 14:54:08 +01:00
DidierRLopes
f14fdfe7a2 Improve SIA experience as based on feedback (#2264)
* improve sia experience

* Pytest : stocks/sector_industry_analysis controller

* Tests : rewrite expected files

* refactor based on Jer feedback

* add the code that I forgot to push lol

Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: Chavithra <chavithra@gmail.com>
2022-08-22 13:10:27 +01:00
Colin Delahunty
f4bcfcca1c Fixed breaking changes to hotpenny (#2368)
* Fixed breaking changes to hotpenny

* Added features

* Added fixes
2022-08-19 09:21:39 -04:00
James Maslek
73f7561f80 Small change + small bug fix (#2359) 2022-08-18 17:55:16 -04:00
Colin Delahunty
6b95d7d3ac Added fixes from the general integration tests (#2357)
* Added fixes from James

* Fixed tests

* More test fixes

* Added fixes

* Fixed tests
2022-08-18 17:03:46 -04:00
James Maslek
52f4d673f8 Fix TA integration script (#2356)
* Fix TA integration script

* test
2022-08-18 15:16:42 -04:00
Chavithra
9e1a58e2db Here we merge all API Refactor related branches (#2236)
* Update api.py

* Updated forex menu

* refactor ycrv command

* refactor ycrv command black

* refactor ecocal command

* Minh changes

* Adding space to test pushing

* title fix ecocal df

* get economic calendar annotation

* fix investingcom tests

* refactor index command

* refactor overview command

* give defaults to wsj view function args

* rename date args investincom

* refacto bigmac command

* fix ecocal typo

* refactor rtps command

* alphavantage gdp

* alphavantage gdp per capita

* alphavantage cpi

* alphavantage tyld

* alphavantage inf

* refactor macro command

* refactor macro command w helpers

* refactor treasury command

* fix macro on terminal

* treasury labels

* refactor maturities

* update treasury maturities doc strings

* refactor get economic calendar finhub

* refactor map command api

* display map filter choices

* route economy api to performance map

* route economy api to performance map

* display group choices on valuation command

* refactor performance and valuation commands

* refactor spectrum model and view

* add choices to spectrum controller

* delete image after view

* fix model tests finviz

* fix finciz view tests

* refactor futures

* fix some tests

* fix more tests

* fix controller test

* refactor fred series notes

* update fred notes docstring

* refacto fred series ids

* fix pred and qa when empty datasets

* refactor fred

* uncomment stuff

* refacto get series data

* fix some tests

* set defaults on args

* refactor fred yield curve

* black

* fix spell and remove ecocal names

* fix linting

* linting

* pylint fix

* change dangerous defaults

* Working through crypto fixes (#2256)

* Working through crypto fixes

* Continued adding crypto stuff

* Added crypto overview

* Added test fixes

* Added fixtures

* Fixed tests

* Fixed charting issue

* Removed broken APIs

* Final adjustments

* Added test fixes

* map get groups and get ycrv countries into old api

* exposed econdb helper funcs

* remove helpers

* refactor search indices

* linting

* refactor arg currency

* pylint from currency

* Started switching crpyto ascending to ascend

* Merging

* Portfolio model arguements, params, and docstring

* Refactored for etf commands (#2292)

* Refactored for etf commands

* Fixed tests

* Added load command

* Fixed menu

* Portfolio logic fixes

* Added econometrics (#2260)

* Added econometrics

* Fixed tests

* Simplified API

* Added test fixes

* Added test csv

* Allowed examples to be loaded

* Fund refactor (#2291)

* Fund refactor

* Changed fund_name and fund to name

* Changed ascending to ascend

* Stock menu refactoring for easier API usage (#2194)

* Stocks  refactoring for easier API usage

* Linting

* Refactor newly added features

* Linting

* Fixing tests

* Refactor common files used by stocks menu

* Fixing flake8

* Fix linting and tests

* Linting

* Fix flake8

* refactor insider_data

* refactor mentions

* refactor watchlist

* refactor sentiment

* refactor sentiment

* fix yahoofinance tests

* refactor load and candle

* refactor get_news and display_news

* refactor stocks.ins.act

* candle default matplotlib

* fix yahoofinance_view tests

* fix ark model tests

* fix ark view tests

* fix business insider model

* fix business insider view

* refactor csimarket model

* fix tests csi market model

* update dd controller

* fix get suppliers tests

* fix dd controller tests

* fix finhub tests

* fix finviz tests

* fix fmp tests

* fix marketwatch tests

* corrected argument keywords in test_bt_model

* corrected argument keywords in test_bt_view

* refactor fa controller

* refactor marketwatch view

* refactor gov controller

* fix tests fa av

* fix tests elect

* fix dcf tests

* fix polygon tests

* fix fmp tests

* fix quiverquant tests

* fix yahoofinance fa tests

* fix more fa tests

* fix insider tests

* fix more tests

* fix more tests

* fix options tests

* fix stock gov tests

* fix tests test_ba_controller

* fix tests for test_finviz_compare_model.py

* fixed 2 tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* fix final tests

* fixed tests

* fixed tests

* Fix tests

* black

* forgot to black tests

* fixed tests

* fixed tests

* fixed tests

* fixed tests

* flakefix

* Tests + code : Stocks / Discovery

* fix tests

* added recorder

* fixed tests

* fixed tests

* black

* black

* remove unused imports

* refactor display raw

* sia dicts fix

* pylint

* linting

* remove dangerous default

* fix tests

* fix beta model test

* black

* skip screener qa test

* change sector path to sectors

* update tests readme

* fix metric defaults

* black

* substitute lost ticker

* defaults cpic

* another round on sia

* refactor cramer

* reduce default tweets on sentiment

* refactor yf hist, corr, volume

* arkorders default

* refactor income, balance, cashflow

* refacto scorr, screener, getfinnhub

* refactor stockgrid

* ibkr refactor

* another round on stockgrid

* add dividens end point

* refactor discovery endpoints

* update docstrings with similar input

* refactor messages

* refactor ba

* refactor regioons

* refactor twitter sentiment

* refactor hist

* refactor regions

* give default to timeframe

* refactor bunch of defaults and arg names

* remove leftover imports

* refactor vwap

* let tests run

* fix tests

* fix stock tests

* fix stockanalysis tests

* flake

* MYPY

* Made important changes

* added fixes

* Fixed big issue

* Added fixes to tests

* fix qa tests

* fix tests

* fix 1 more test

* last stocks failing

* fix crypto test

Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: montezdesousa <montezdesousa@gmail.com>
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: colin99d <colin99delahunty@gmail.com>

* fix portfolio tests

* change period to window

* update ca docstrings

* refactor get_similar_companies func

* Fixed

* Update CI

* Update CI 2

* Update CI 3

* Update dependencies

Co-authored-by: colin99d <colin99delahunty@gmail.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: montezdesousa <montezdesousa@gmail.com>
Co-authored-by: James Simmons <simmonsj330@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: northern-64bit <75195383+northern-64bit@users.noreply.github.com>
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
2022-08-17 15:28:54 +01:00
Colin Delahunty
ee0e1e9822 Country debt (#2311)
* Storing for now

* more

* added

* Added new feature

* Added fix to tests

* James changes

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-08-16 11:13:23 -04:00
Colin Delahunty
fc8dec2b7a More Options Tradier Fixes (#2309)
* Added features

* Fixed tests

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2022-08-16 10:30:39 -04:00
soggyomelette
a9755e2847 add a test for oanda key (#2297)
Co-authored-by: Chavithra <chavithra@gmail.com>
2022-08-16 11:56:43 +02:00
Colin Delahunty
c6f12b779a Polygon candle from UTC to EST (#2304)
* Fixed getting data from polygon

* Fixed tests
2022-08-11 16:03:23 -04:00
Colin Delahunty
fa5e62eb50 Options tradier fix (#2295)
* Fixed issues

* Fixed tests
2022-08-11 07:33:23 -04:00
Colin Delahunty
317bca69ba Added yfinance as a source and converted to pandas read_html (#2286)
* Added yfinance as a source and converted to pandas read_html

* Fixed tests

* Forgot to add my helpers
2022-08-10 16:32:03 -04:00
Colin Delahunty
bd12c203a0 Fixed bad yfinance urls (#2282) 2022-08-09 17:10:32 -04:00
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