Commit Graph

975 Commits

Author SHA1 Message Date
OpenBB
5f9d07c390 black 2023-07-24 17:38:47 +02:00
OpenBB
d4f4d9fc91 fix assertion error with test_economy_controller: test_menu_with_queue[queue0-expected0] 2023-07-24 17:38:47 +02:00
OpenBB
a3427b0557 fix test_economy_controller 2023-07-24 17:38:47 +02:00
OpenBB
f113fc27e3 put spaces in columns for econ/performance and valuation and make sortby work 2023-07-24 17:38:47 +02:00
OpenBB
2b1e04679c fix Finviz screener Perf 1Y returning as 1970-01-01 2023-07-24 17:38:47 +02:00
OpenBB
7121abf7d6 rename 1Year column to fix returning as 1970-01-01 2023-07-24 17:38:47 +02:00
OpenBB
d85cae6193 fix windows int overflow economy/edebt 2023-07-24 17:38:47 +02:00
Danglewood
31f595bc99 update test_get_floor_price 2023-07-24 17:38:47 +02:00
montezdesousa
1453885ab4 add public routines flag (#5236)
* add public routines flag

* Spelling

* mypy

* Tests

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-07-24 13:22:47 +02:00
Henrique Joaquim
ac771cf14a Merge branch 'develop' into feature/openbb-sdk-v4 2023-07-21 09:42:10 +01:00
James Maslek
87b5bdb521 Release Cleanup (#5233)
* turn hold off when run even if no figure

* Add warning text to PlotlyTA

* better wording

* fixes #5232

* Fix askobb + updaate reqs

* bump requests

* Couple other bumps

* Here we go with the mac builds

* That wasn't right

* Not gonna have a good time today

* Previous miniconda

* did that wrong

* Wrong version

* ?

* installer-url instead

* 3.1 not 5.1

* CONDA UPDATE

* Revert the mac builds

* Run poetry lock and update some packages

* bump poetry on unit test

* Fix one test

* Add vanilla 3.11

* Fix issue on runner

* One last try

* Remove windows conda :D
2023-07-20 22:26:05 +00:00
James Maslek
8b007785a1 Adds a matlab like hold on to plot on same axis (#5173)
* definitely not juan walking me through everything

* trying to pretty it

* start doing same axis with hold

* actually do the sameaxis correctly

* Better docstring

* Fix mypy

* mypy3

* pylint fixes

* Add message about candle

* might work, might now

* Update stocks_controller.py

* Update plotly_helper.py

* Update plotly_helper.py

* Make fmp view legends nice

* Update helper_funcs.py

* Add custom legends for when hold on

* bigger font

* add colors to new axes

* add custom title, remove location

* Start guide.

* Update plot-holds.md

Add figures

* More words

* Update plot-holds.md

* Finish guide

* tests

* Sneak in test updates for release

* guess not sneak test

---------

Co-authored-by: teh_coderer <me@tehcoderer.com>
2023-07-19 23:29:24 +00:00
Theodore Aptekarev
04d5cb1e16 Merge branch 'develop' into feature/openbb-sdk-v4 2023-07-17 16:51:00 +02:00
James Maslek
830159f718 Update treasury command to get directly from fed (#5215)
* Update treasury command to get directly from fed

* test

* Fix the codespell lint

* Mypy

* help text

* mypy + askobb update

* pylint now

* Fix #5190

* Fix report

* ruff life

* Fix #5172

* economy report titles

* Make the chart nicer
2023-07-14 17:33:31 +00:00
teh_coderer
281799f047 hotfix / improve autoscaling/dynamic loading, fix forex candle charts, equity reports (#5183)
* improve autoscaling/dynamic loading, fix forex candle charts

* updates

* Update plotly_helper.py

* fix?

* fix table date sorting, localize forex load

* tests

* tests?

* ugh tests

* Update test_display_debt.txt

* Update test_get_debt.csv

* Update forex_helper.py

* close #5182

* fix `crypto/dd/info` tables not loading due to `dict` object in dataframe values

* Update parent_classes.py

* tables: show full value on hover, fix year only filtering. on reset use queue if logged in

* lint + first batch of test fix

* tests pt2

* Tests v3

* Pylint

* typo

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-07-14 14:46:01 +00:00
James Maslek
52c560d414 Close 2 stocks fa issues with polygon (#5217)
* Fix #5190

* Add quarterly back to polygon cash flow

* Add some to stocks statics

* lint

* Fix tests + balance all of a sudden not working
2023-07-14 14:27:04 +00:00
Igor Radovanovic
4629a47cac Merge branch 'develop' into feature/openbb-sdk-v4 2023-07-14 16:26:52 +02:00
montezdesousa
92027a6a0e Fix prompt typo (#5192)
* fix prompt typo

* Update banner.txt

* rewrite prompt on test

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-07-13 17:42:15 +00:00
teh_coderer
002a44b6f1 hotfix / Moving Averages Export (#5214)
* Update overlap_view.py

* tests

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-07-13 16:28:49 +00:00
Igor Radovanovic
148b373d9c Merge branch 'develop' into feature/openbb-sdk-v4 2023-07-13 14:42:15 +02:00
Igor Radovanovic
c469ca3853 Fix income statement and lint 2023-07-12 14:11:25 +02:00
Igor Radovanovic
228ab0b529 linting 2023-07-12 11:51:46 +02:00
James Maslek
9ab1674604 Make some improvements to askobb (#5205)
* Edit txt files and generate docstore

* crlf -> lf

* Unused files
2023-07-07 18:50:58 +00:00
James Maslek
84f215d4bd Remove economy/rtps and stocks/ta/rsp (#5181)
* remove economy/rtps

* remove ta/rsp

* Forgot the sdk

* remove  from stocks/ta choices

* remove terminal ta intro reference

* remove sdk economy intro reference

* remove from integration tests

* delete gpt index txt files

* more .md files to remove

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
2023-07-07 14:06:43 -04:00
Danglewood
8df31f8de4 feature/usd-liquidity-index: Adds USD Liquidity Index to Economy menu (#5174)
* add USD Liquidity Index to Economy menu

* mypy

* add screenshots to Terminal Economy Intro

* add test to test_fred_model

* add Broad US Dollar Index to list of comparables

* docs pages update

* fix test_nasdaq_model

* ask obb indexing

* return just the calculated series by default

* a grid for Squares

* raw table output

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: martinb-bb <105685594+martinb-bb@users.noreply.github.com>
2023-07-06 15:50:10 +00:00
Danglewood
598e745beb hotfix/fix-intrinio-load: (#5188)
* fix intrinio stocks load

* update test_stocks_helper

* makes --monthly --weekly work

* pytest

* fix test

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-07-05 16:52:37 +00:00
Danglewood
b6b1fcd782 adds 6 new indices to the index list (#5185) 2023-07-05 13:24:18 +00:00
teh_coderer
923327c321 hotfix / Save session on oauth login (#5195)
* save session on oauth login

* avoid `asyncio.run` if in a running loop

* tests

* fix economy rtps
2023-07-04 23:08:16 +00:00
Harsh Vardhan Sharma
ecf7814ffd Adds Topledger on-chain data (#5029)
* Adds Topledger on-chain data

* Update with Review Comments

* Updates API Documentation for Topledger API

* Removes Duplicate entry from trail_map

* Updates Topledger Org Slugs & API keys

* Fix Linting Error

* Fix Linting Error

* Fix Linting Error

* Fix pylint errors

* Fix onchain_controller test for help text

---------

Co-authored-by: Deepak Khatri <3785149+dkdocs@users.noreply.github.com>
2023-06-30 16:16:59 +00:00
teh_coderer
d2ed7c28ac hotfix / TA ma's empty if not enough data for window (#5180)
* fix: TA ma's empty if not enough data for window

* Update test_load_options.yaml
2023-06-24 02:59:07 +00:00
Danglewood
4bc4368ff1 fix columns subtracting (#5170) 2023-06-22 21:52:48 +00:00
James Maslek
590f487dbd update test 2023-06-21 10:33:40 -04:00
montezdesousa
105557e898 Feature/routine tags (#5154)
* no guest if installer

* prevent guest if logout from account

* this not true

* rename reloop var

* ask for email again if no email

* add tags to routines upload

* Update constants.py

* Update terminal_controller.py

* Update terminal_controller.py

* black

* ruff

* black

* Update constants.py

* point at .co

* mypy

* sneak in askobb timeout

* fix test

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-06-21 12:31:00 +00:00
teh_coderer
8a70c6205d Feature/ Pywry login (#5115)
* Update .gitignore

* init

* Update backend.py

* Update main.tsx

* Update no_import.py

* Update session_controller.py

* indents

* adjust window size

* update keys

* re-add save session for pywry login

* pop response keys on rename

* walrus remember

* use session username for profile

* implement logout clearing of cookies

* don't display welcome when logging in from `account` menu

* Update session_model.py

* Update session_model.py

* customdata handler for charts

* fix remember key

* only slice data if chandlestick trace in data

* Update profile_model.py

* Update streamlit_run.py

* Update plotly.html

* test

* Update loggers.py

* updates

* Update session_controller.py

* Update session_controller.py

* no longer need to call_hub for logout

* tests

* Update test_session_controller.py

* Update profile_model.py

* bump pywry, fix numbers passed as strings tables

* update plotly frontend packages

* formatting

* Update backend.py

* Update backend.py

* change to prod

* return on image export

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-06-20 17:47:38 +00:00
Danglewood
42bf98d6a4 hotfix/options-chains-guide: Adds SDK intro guide for Options Chains (#5155)
* add SDK intro guide for options chains

* add screenshots to page
2023-06-20 12:52:52 +00:00
Danglewood
a7edda330d Feature/options - OpenBB Options Enhancement Proposal (Part 1 - SDK) (#5079)
* add model file for Montreal Options Exchange

* mypy fixes

* define attributes under __init__

* type error fix

* another pylint fix

* adds tests for tmx_model

* black

* mypy

* adds expirations test and re-records

* black

* capture error message in test

* mypy

* add __docformat__ line

* improves get_all_ticker_symbols

* removes python magic command for new cell

* adds TMX as source for SDK chains

* starts on a new method for loading options data returning a standardized object

* add load_options as SDK endpoint

* intrinio response - not complete

* adds tradier to load_options

* add source attribute to options object

* restore legacy nasdaq last price function

* yFinance underlying_price fixes

* yFinance model fix

* adds cboe to sdk options load

* table fix

* creates options_chains_model.py and updates SDK map

* docstrings added for the class.

* updates tmx_model tests

* fix options_controller test

* adds cboe_model tests

* spelling in docstring

* ruff - unused import

* mypy fixes

* more mypy fixes

* pylint

* attempt to manually resolve merge conflict.

* nasdaq_model fix

* adds test coverage for options/nasdaq_model

* docstrings update for nasdaq_model

* mypy fix

* adds unit testing for options_chains_model

* adds additional tests for intrinio_model

* unused import fix

* fix for .TO symbol and TMX EOD chains

* make CBOE Pydantic

* cboe update

* adds switch for pydantic output from all sources

* black

* index options error handling for Intrinio

* add warning message for index options from Intrinio

* tmx_model enhancements

* cleans up get_ticker_iv() in cboe_model

* fix ticker info for index symbols from cboe

* typo in comments

* adds test for tradier_model.load_options

* cboe optionType as lower case

* add function for calculating chains stats

* black

* trailmap for calculate_chains_stats

* adds test for calculate_stats()

* more details to nasdaq.underlying_price

* typo in docstrings

* mypy - options_chains_model.py

* black - options_chains_model.py

* pylint options_chains_model.py

* standardize response from intrinio underlying price

* add function to validate input of function

* missed type hint

* additional error handling for stats

* adds DTE as column for all sources

* adds strategies function and input validation

* add yFinance test for load_options()

* add Nasdaq test for load_options()

* tests for new functions in options_chains_model

* update sdk trailmap

* rewrite tests

* fixes for tests

* fix tmx_model test

* more pytest

* pytest..

* add vertical call spread function

* some cleanup

* update nasdaq tests

* more cleanup

* black

* pylint

* black

* ruff

* black

* pylint

* black

* pylint..

* tests rewrite

* more pytest

* recapture tests

* Different tests were collected between gw1 and gw0

* adds vertical spreads

* vertical_put_spread

* improve calculate_stats

* mypy

* edge cases

* black

* update tmx,yfinance tests

* new cboe tests

* new tmx_model tests

* fix nasdaq test

* test updates

* fix nasdaq tests

* add test_options_chains_model

* refactor data sources

* black

* pylint

* fixing stuff

* forgot a file..

* codespell

* linting

* mypy...

* refactor OptionsChains class

* pylint

* reconfigure SDK entry point

* fix error handling when data request fails

* ruff

* pylint

* pylint

* Add inheritance and a repr string

* add method for skew

* add method for skew

* fix nasdaq test

* add skew to tests

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-06-19 13:11:16 +00:00
James Maslek
27bf7207ee Small enhancements (#5146)
* Cosmetic changes + timeout bug

* cant spell

* Fix #5085

* Handle ca tickers + fix tests

* wrong type

* pylint
2023-06-16 14:46:11 +00:00
Igor Radovanovic
08433a76c8 Fix income and cash flow statements (#5137) 2023-06-14 12:57:43 +00:00
jose-donato
c5d5b511ac Adds crypto fees revenue command (#4067)
* fix: initial commit

* fix: extra stuff

* fix: lint

* fix: ruff

* fix: linting

* fix: ruff

* fix: pylint

* fix: maybe fixed tests maybe not

* fix: pr issues

* fix: tests

* fix: updated test locally

* fix: generate sdk cmds

* fix: added source

* fix: tests maybe

* fix: lint

* fix: tests

* test

* test

* test

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
2023-06-13 13:50:17 +00:00
Igor Radovanovic
6ed43197db Fix wrapping (#5133)
* Fix wrapping

* Re-record unit tests
2023-06-13 12:37:39 +00:00
Sai-132
6784a9af84 Feature/news sentiment (#4339)
* News sentiment feature added

* News sentiment feature added

* Integration test script file added

* Updated code as per PR Instructions

* API key setting and testing code updated

* Unused imports and line-too-long code updated

* Resolved conflicts in config_terminal file

* removed empty line in terminal_controller file

* Resolved conflicts and updated code for Setting API keys

* Suggested changes have been updated

* Changes updated

* conflicts resolved with data_sources_default.json file

* Code Updated For without API key

* Code Updated

* New changes Updated

* Resolved conflicts and code updated

* Small edits

* missed a spelling error

* fix test

* Lint

* pylint rewrite

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-06-09 16:26:35 +00:00
minhhoang1023
c34d703786 Large Language Model - Text to command (#4695)
* POC for text-to-command

* POC

* gimme -> askobb (#4740)

* Add file to generate index data

* Add generate index file

* Remove data file

* Modified data generator

* Update .gitignore

* linting

* run all cmds with root access. new!

* output msg

* modify model name

* weird logging issue

* refactor for new llama index version

* black

* in case model doesnt know

* black linting

* linting

* more ruff

* imports

* nicer messages

* removing function from economy

* poetry

* prompt refinement

* Update spec to bring in new files

* fix llama import

* help command

* missed trailing ]

* -q parameter

* remove experimental

* switching gpt model functionality

* update prompt

* tik tok on the clock

* fixed print statements

* user run commands

* add return

* fix

* fix

* removing a few depr functions

* Add filter for slashes in askobb query

* force -q command

* removing returns

* Add edge case for custom filter

* add back -q if its not in other args

* minor checks

* new prompt - a little better

* more cases for not finding answer

* return clause

* new txt with summaries

* update index ver

* new index

* Add a log_askobb

* revision on prompt

* black

* poetry lock

* req files

* Codespell

* ruff

* Linting some stuff.  Change OpenAI from local to HUB

* Update api-keys.md

* openai key

* remove this. bye bye mypy

* mypy

* mypy...

* mypy2

* fix test

---------

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: teh_coderer <me@tehcoderer.com>
Co-authored-by: martinb-bb <105685594+martinb-bb@users.noreply.github.com>
Co-authored-by: martinb-bb <martin.bufi@openbb.finance>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-06-09 16:00:47 +00:00
Danglewood
9ded286652 adds VIX9D and VIX3M to index list (#5119)
* adds VIX9D and VIX3M to index list

* update test
2023-06-09 14:03:24 +00:00
Danglewood
a311ce4686 hotfix/deprecate-options-screener: Sunsets deprecated Options screener (#5111)
* Sunsets deprecated Options screener

* mypy

* docstring fix

* one more docstrings fix

* missed i18n.yaml artifacts

* pylint

* fix test
2023-06-06 18:40:52 +00:00
Danglewood
f0e0217083 hotfix/fix-balance-headers: Fixes #5094 (#5099)
* fixes bad headers for ca/financial statements

* remove unnecessary lines
2023-06-02 13:06:28 +00:00
Sameer Khan
d662b69c6f Feature/futures curve history (#5086)
* add past contract prices to curve table

* adds secondary curve to viz

* includes error message when no data for selected date

* linting

* adds back linespace

* changed as-of parameter to d and date

* fixes ruff

* more linting and tests

* fixes for pylint test

* edit the xaxis formatting

* fix the tests

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-06-01 20:41:17 +00:00
montezdesousa
76fcaf77da Upload routine to hub on stop (#5077)
* upload routine to hub on stop

* write cassette

* write cassette

* remove .openb from name

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-05-31 10:42:56 +00:00
DidierRLopes
72a46fbfbf OpenBB Script Routines major improvement (#5005)
* Allow to set variables and do loops

* Fix mypy errors

* improve code

* mypy

* pylint

* accepts Openbb date keywords like 1MONTHAGO,LASTFRIDAY,3YEARSFROMNOW,NEXTTUESDAY

* warn fix

* add documentation for script foreach and vars creation

* refactor controller as per James request

* black linting

* add another warning

* Editing some routine enhancements (#5063)

* move routine to new file

* Move to relativedelta and add some tests

* Fix mocking

* Get match_and_return_openbb_keyword_date to 100% cov

* start testing parse script

* remove rogue prints

---------

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>

* big improvement in routines tests

* mypy lint

* ruff lint

* lint

* typo

* test relative time

* cover edge case of home at end of script

* fix edge case for going to home at start

* explain better slicing

* foreach tests added

* lint

* allow foreach loops to have different var names that is iterating

* foreach more powerful

* warning when var in foreach is not used

* fail script when varname that iterates foreach loop is never defined

* black

* lint again

* ruff

* improve another edge case

* fix test and fix a description

* fix nft test and routine test

* why mutual fund test failing

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-05-30 17:33:59 +00:00
James Maslek
fb1bf21af1 Update download link on update version text (#5075)
* Update download link on message

* tests
2023-05-29 17:08:25 +00:00
Adi Sai
fcb78d71f2 Feature/ultima top headlines (#5061)
* initial integration of top headlines

* top headlines formatting

* re-ran tests

* fixing typing issues

* passed test

* fix ruff

* guard top headlines call + pass tests

* Minor cosmetic changes

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-05-26 16:18:08 +00:00