mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
* fix reset_index erasing the name of the column (#6619) * update aiohttp for dependabot (#6621) * [BugFix] Fix Pandas FutureWarning In `derivatives.futures.curve` Chart (#6626) * fix Pandas FutureWarning in derivatives.futures.curve * black * [BugFix] `obb.news.world` Add Validators To Providers Where Symbol Is Mandatory (#6625) * add validators to enforce mandatory symbols in providers where required * linter * fmp 3.9 test cassette --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * data.__fields__ is deprecated - use data.model_fields instead (#6629) * Docs fix spelling issues (#6634) * fix README.md * fix README.md * fix examples.md * fix CONTRIBUTING.md * Update README.md * [BugFix] Replace `Optional[bool]` with `bool` as type in Equity Search (#6633) * replace optiona[bool] with bool as type * one more * test cassettes --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * [Feature] Add BLS Provider Extension With Endpoints For Search and Time Series (#6630) * add bls provider extension * null is returned as '-' * codespell * mypy * missed colon * more linting * more lint * missing charting api test * handle months starting with Q * too many branches * make annual_average False by default * review items * example notebook updates (#6639) * fix output of yfinance.download Date for Colab (#6645) * capitalize economic indicator symbols before pairing with country (#6642) Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Feature] Add CFTC Provider and Replace Nasdaq Datalink For COT Reports (#6643) * add cftc provider and replace nasdaq for COT Reports * linters * more linting * grammar police * mock all url params in test cassette * record test cassettes with no 6901app_token --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * add trust_env to ClientSession initialization to mimic proxy behaviour of requests library (#6640) Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * adding extra presets (#6623) Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Release] Patch: `openbb-yfinance-1.3.2` (#6647) * add snowflake integration video (#6339) * [HotFix] Fix broken URLs in docs page. (#6368) * Fix broken URLs * use full URL to other docs pages. * [Release] 4.2.0 (#6422) * [Docs] Remove Reference to `to_chart` in OBBject. (#6096) * remove reference to to_chart in OBBject. * put chart description back in OBBject properties * [Feature] - Create openbb assets folder (#6101) * create openbb assets folder * fix unittest * rebuild --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [BugFix] Fixes to_df() where the date series contains multiple TZ-offsets. (#6099) * allow mixed utc offset in a tz-aware date column * enforce ascending from all providers for price.historical * fix tests * add comments and apply treatment to basemodel_from_df before JSON output * yfinance consistency * add unit test * add unit test * better test * ruff --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Update the quantitative extension to make more sense (#6087) * Split out a rolling submenu for the rolling functions * Make a performance and a stats submenu. * Test the statistics functions * lint * lint * dupe test * pylint * ruff * Try tests quick * black magic signature funcs * fix my custom tests * Fix the existing imports/urls * push the api update * okay I figured out whats going on * this should be all of them * Correct docstringing examples --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [BugFix] Fix ECB Yield Curve (#6108) * fix ecb yield curve * standard model update * Update unit-test workflow to check for changes to openbb_platform (#6109) * [Bug fix] - Fix package mypy (#6110) * fix: package mypy * types * black * [Feature] - Equity router descriptions & examples (#6103) * feat: equity/calendar * feat: compare router * fix descriptions * darkpool + discovery * fix paragraph issues * fix descriptions * fundamental part 1 * fundamental part2 * transcipts * ownership * fix * price * shorts * Update darkpool_router.py * minor fix * shorts examples * examples * ruff * black --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Feature] - Add `exception_handler` decorator to static (#6112) * add exception handler decorator * add exception handler decorator code * updated static * rebuild to fix docstring indentation --------- Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * update extensions list (#6114) * add missing field descriptions to yfinance equity price historical (#6116) Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * remove charting extension env var (#6118) * [BugFix] Fix Company News (#6111) * fix company news * update tests * multiple symbols for polygon * don't include pageSize in Benzinga querystring, fixed as 100 * remove extra space * black * unused imports * make benzinga test cassette smaller * missing params * clear empty strings --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [BugFix] Allow Multiple Symbols in `equity.fundamental.metrics()` from `yfinance` (#6124) * allow multiple symbols in key_metrics from yfinance * field order thing * remove unnecessary function (#6125) * [Docs] Update OpenBB Copilot docs (#6106) * WIP: Tweak description. * WIP: Experimenting with react-player * WIP: Add copilot docs. * fixes videos width/height * WIP: Refine videos and copy. * WIP: Add last videos and sections. * Add bring-your-own-copilot section. * Tweak grammar. * Add copilot link. * Fix typos. --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * [Enhancement] Add Previous Close to DATA_DESCRIPTIONS (#6120) * add data description for previous close * ..just the one * update the model tripped by this change --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * added australia as a country also (#6131) * [Bug fix] - Fix regulator cik map standard model (#6129) * Fix regulator cik map standard model * fix description * Update cik_map.py * increase timeout to 30 (#6115) Co-authored-by: James Maslek <jmaslek11@gmail.com> * clean up some v3 deps (#6105) * clean up some v3 deps * forgot we need to do the requirements txt files * not sure it matters, but run ruff + black * am addicted to bug fixes --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [Bug fix] - explicit multiple items docstring (#6127) * explicit multiple items docstring * rebuiild * rebuild again --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [Feature] Pretty Pydantic `ValidationError` exceptions (#6130) * fix validator in fmp IndexHistorical model * make ValidationError pretty * modify arg error * linting fmp IndexHistorical * black * remove unused code * tmx etf info (#6132) Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * [Feature] - Platform V4 Markdown Generator V2 (#6094) * add recent `openapi.json` * fix data types in models * removed `openapi.json` * set default date value as None in PolygonCurrencyPairs class * add function to generate reference.json file * reworked function to improve readability * reword function to add seo metadata * add functions for creating markdown sections * add code to extract data card markdown title * add additional functions for generating index and data models file * extract first sentence of the description for cards * code cleanup and documentation * linting * linting polygon models * add openbb import statement in create_reference_markdown_examples function * add POST method functions * cleanup; reworked generate_reference_index_files function * moved development section to 7th position in the sidebar * fix POST function params default value add standard flag to QueryParams and Data fields cleanup * add type expansion from package_builder.MethodDefinition * sort data models cards alphabetically make printing less verbose * make MAX_CARDS global display less content in cards in Commannds section * cleanup * Remove '_' from the cards under Commands section * " to ' in econometrics/causality * replace ' with " in ReferenceCard for reference dir index files * remove extra . from the quantile function description * shoutout to @deeleeramone for finding POST method description bug! * set correct value for standard field * handle BaseModel types in provider data fields * unit tests for the platform markdown generator v2 * yeet 'Default' and 'Optional' columns in the 'Data' section * last minute bug fix * add info for multiple symbols * make multiple items info same as platform static * organize sections properly * sort reference sub-directories alphabetically * extra space in 'OBBject extra' description * add type expansion for fields with multiple items POST method cleanup --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Docs] Adds Example Notebook for the Implied Earnings Move (#6128) * adds example notebook for the implied earnings move * remove commented out line --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * [Feature] - Sync with new openapi.json (#6137) * feat: create data tabs * fix: uncomment * fix: remove unecessary comment * sort side bar * comment * uncomment * use .dev functions.json + clean traverse * fix futures example * fix example * point to .co * Fix the v3 markdown generation workflow (#6138) * fix workflow * debug time * see if the docs generate at least * ahhhh i found it * getting there * put the test first * some keys cleanup * small change to error message * update functions.json (#6140) * fix intraday check in charting ta_class (#6119) Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * [BugFix] Display EconDB as source for macro (#6143) * [BugFix] Disable Intrinio `InstitutionalOwnership` model (#6142) * disable fetcher in init and fetcher tests * disable provider test params from equity python and api tests * updated static * add more examples into findSymbols (#6139) Co-authored-by: James Maslek <jmaslek11@gmail.com> * [BugFix] Fix SEC ETF Holdings Parsing Exception (#6121) * fix etf holdings * linting * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/update xl docs (#6145) * remove print * update obb.get docs * example * md lint * fix get reference (#6147) * [BugFix] Filter OECD data using `start_date` and `end_date` parameters (#6144) * move constant dicts to constants.py filter by start_date and end_date * black * black again again * Merge 'main' into 'develop' (#6151) * Release/3.2.4 (#5696) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * 3.2.3->3.2.4 * Changelogs * new changelog --------- Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> * Release/4.0.1 (#5840) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Release/3.2.4 (#5704) * 3.2.3->3.2.4 * Changelogs * new changelog * OpenBB Platform v4 (#5225) * change location * check something * add cache * fixed auth w/@IgorWounds and @montezdesousa * fixes for econometrics * include Darren auth suggestions * some routers included if dev + chg hub backend var * coverage router should not be here * update docker readme * forgot to check auth here * Change extension imports * update docstrings and readme * headers function wasnt being called, just referenced * relative import * econometrics add headers everywhere * Fix QA * Fix TA * Fix test * Fix python interface QA and TA * Lint * Cleanup * Change path * make the changes and some etf models * tests for command_runner * ruff * solving naming issues on pytest * Update some docstrings, fix typos and lint * solving econometrics instantiating wrong openbb * chaging the way pytest runs * messing around with the imports * ruff * Change template to add platform considerations (#5533) * change template to add platform considerations * @the-praxs suggestions * solving __pycache__ issue * removing typo * ci yml * making linters happy (i guess) * Improve Omega Ratio and docstrings * chaging pro validation hash * ruff * Fix OLS Summary and lint * Add OECD Provider for economy extension (#5534) * Add record to docs * update a couple of cboe models * Fix econometrics bugs. Make tests pass. Lint. * black * ruff * pydantic v2: remove deprecated Extra * pydantic v2: self.dict -> self.model_dump * revert pydantic * revert the revert * try 1: pin urllib3 < 2 * Revert "try 1: pin urllib3 < 2" This reverts commit3736c311cb. * Revert dep * Fix * re-lock * Skip all tests when doing cspell in pre-commit * Resolve linter errors * Add OECD to install script * Add OECD * Resolve more linter errors * Exclude static files of v4 python from ruff * More linting * Another attempt to resolve even more linting errors * Change how Literal is used * ticker. symbol. consistent. @piiq * change ticker field in Stock Search to is_symbol * Update Cboe model for stocks_search -> is_symbol parameter. * Fix issue * Lint * Small QA to rename SDK to Platform (#5544) * SDK -> Platform in docs * renamed in core * renamed in openbb `init` * `sdk` variable renamed as `platform` --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * `validator` -> `field_validator` in standard models * Standard convention for multi-ticker symbols (#5549) * standardize symbol input param in forex and crypto historical data * static * linting * Fix stock_search integration test params * Update dependencies and linting on the CI (#5550) * Remove ruff and black from platform dependencies * Update codespell configuration * Lint python code * Add toml and tomli to root dev dependencies * Update requirements.txt files * Fix buggy docstring in python package methods (#5548) * fix buggy docstring for methods * remove space * fix typing * avoid name collision with validator * Revert "avoid name collision with validator" This reverts commit8a30a44555. * typing * rebuild * python 3.8, ParamSpec not available * lint * ruff noqa * Merge with develop (#5551) * Charting extension integration tests (#5547) * initial proposal for integration tests on the charting extension * int tests for charting generation * python generator * ruff * boilerplate templates * python tests * tests for the api * using body instead so data don't get redefined * unit tests for coverage * ruff * docstrings * unnecessary access to keys() * Add trading economics economic calendar * dev install * Data Models disposition on the website (#5538) * pydantic v4 * flat structure * md files * Revert "md files" This reverts commitbd2170e2ad. * improve command descriptions * nice title and description * human readble data model names on left panel * implementation details section * content markdown files * markdown versioned files * showcase page * updates --------- Co-authored-by: tehcoderer <me@tehcoderer.com> * everything except tests * fix `datetime.date` import in fetcher test * modified url to remove `api_key` placeholder * record test * api key is called c here * fixed fetcher test for api key * recorded tests * refactor * life is ruff * codespell * Make Intrinio options chains great again (#5540) * add multithreading * cleanup * linting * use dateutil.parser * removed `TICKER_EXCEPTIONS` * modified `date` and `type` fields in standard model * set alias for `date` and `type` to match standards * static * static * Hotfix/fix post tests (#5555) * Fix econometrics * Fix ta * Fix qa. Remove intrinio to not be rate limited * Lint * Fix typo * obbject tests (#5558) * obbject tests * ruff * fix dev_install * fix unittests * black on nox * black on nox * nox * fix fetcher test so it can compare dates * fix intrinio tests * ruff * change to model_dum() instead (#5561) * Passing tests (#5560) * Passing tests * fix options * Fix most tests and bugs * fix forex missing params * make symbol upper in polygon fx pairs * fix fixedincome integration tests (#5564) * Fixing charting api integration tests (#5562) * fixing charting api integration tests * black * fix stocks less five API fails * fix the 5 failing stocks integration tests * recapture fmp stock news unit test * fix fmp forex api test * couple more forex integration fixes * changing the request to always use the legacy session. @jmaslek this is was broken for 3.8 and 3.9; with this change apparently all versions work - lemme know if you see any issue with this change * ruff * fix ta * add missing param * fix testers for the api * fix globalnews to use images instead of image * remove unncessary pandas import * econcal int tests * update gitignore * fix get_querystring to support lists * add missing parameters --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * Stock Historical standardization and UX improvements (#5457) * polygon add interval standard param * attempt at standardization * Alpha Vantage params standardization * rename `get_intervals` and fixed bug for extracting wrong value * missed changing it in `extract_data` * linting * polygon cleanup * modified `start_date` & `end_date` type to `datetime` from `dateType` * standardized intrinio stock historical params * fixed yfinance * linting * revert start and end date to dateType from datetime * fix alpha vantage * changed param * fix intrinio infinite loop * `validator` is `field_validator` * revert time params and fixed intervals * `outputsize` alias set in `Field` * set interval description using in-build dict * yfinance stock param standardization * static * intrinio cleanup * Polygon add api params as `PrivateAttr` * modified yfinance params to `PrivateAttr` * intrinio remove overriding date params * fixed description for AV adjusted param * fix alpha vantage intraday not working * re-record and pass unit tests * pass integration tests * Update test --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Fix econcal endpoint (#5567) * fix econcal for python interface * fix econcal tests * fix non supported json output * Fixes FMP index endpoint to get 1 day interval data (#5535) * fix FMP endpoint for getting index data for `1day` interval * fix `open` type to prevent validation error * modifed `validator` to `field_validator` * type of fields is `StrictFloat` * re-record and pass test * linting * `validator` -> `field_validator`, a3'd everything * Fix regression in tests. Lint * updating the integration test actions * Fix typo * Fix typo * Fix import * Publish versions `a3` to Pypi (#5568) * bump versions and script to publish * small improvements * uncomment exception * openbb * publishing guidelines * improve docs * add providers to economy api * make symbol required in stock_quote * Fix keys * Fix oecd * add comma * revert * Add quotes * Sleep * Improve tests * Improve * Feature/query transform (#5566) * inject query into transform_data * swap query and data * update missing fetchers * last test failing * sig test fetcher * black * av add `query` to `transform_data` call * transform_data: missing refactoring * fix uvicorn command in the doc * Automated examples (#5576) * Automated examples * Fix bug * Lint * static assets built on 3.8 * Revert "static assets built on 3.8" This reverts commitfb82ff7bd9. * remove assets * static assets on 3.8 * static assets on 3.8 * Wrap in quotes * Improve wrap * minor fix * rebuild 3.8 * Fix bug * Fix edge case * Lint * rebuild --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * use SecretStr for sensitive fields (#5578) * use SecretStr for sensitive fields * fix * docstring * Add tests for provider (#5583) * Add tests for provider * Test standard models * Lint * Fix standard model issues. Co-authored-by: @the-praxs * linting * `symbol` -> `is_symbol` in `economy.index_search` * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * feature/v4-biztoc-provider: Adds Biztoc provider and GlobalNews (#5546) * add biztoc provider * duplicate field * black * request headers * recapture test * move stuff around * add integration tests * duplicate OECD entry in dev_install * duplicate entry for oecd in pyproject.toml * Add Biztoc to workflow * update readme: credentials * Add Preferences to README * improve tests * fix biztoc * obbject pylint * Bug fix: serializ SecretStr before dumping to json * export credentials as json (#5592) * Check for wrong, changed, or outdated params. (#5597) * Improving `economy.cpi` for the FRED data (#5602) * remove multiindex using coding magic * Update field descriptions --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Improve error message. * Improve * Test tests (#5607) * Test tests * Add test * 4.0.0a4 PyPI publishing (#5608) * changes to publish * fix mini conflict * typo * cleaned `descriptions.py` * fix description in `cpi.py` * Add ETF extension to v4 (#5609) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add ETF historical price from yfinance (#5610) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add etf historical price standard model and route * Add etf historical data from yfinance * Add unit tests * Fix linter error. Organize imports * Update test data * Revert common descriptions erased by CPI PR * remove `symbol` from data for `stocks.ca.peers` * Test docstrings (#5613) * Test docstrings * fix minor bugs w/@IgorWounds * static only w/@IgorWounds * fix `importance` param in `economy.econcal` * right static only w/@IgorWounds * Fix econcal and add tests to noxfile * fix econcal static * re-record --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Clean up the newly created ETF extension (#5611) * Add ETF to dev_install bundle * Add integration tests for openbb-etf * Patch integration test generator scripts to produce lintable code * Add py.typed markers for extensions * user preferences descriptions (#5593) * user preferences descriptions * typo * Feature/v4-sec-provider: Add SEC provider to V4 (#5556) * coerce string type, add default=None * add sec provider and FTD function * update description * ruff * data model definitions in standard model already * duplicate oecd entries in dev_install and pyproject * actually commit * integration test * add stock search to SEC * add company filings for SEC provider * integration tests * remove duplicated line * ruff * **kwargs in Transform Data * some helper functions for later * black * add helper for mutual fund and etf lookup * add some SEC lookup helpers to a new regulators extension * black * ruff * fix test param * take institution filter out of sec stock_search * ruff * remove URL that codespell doesn't like * add cik-to-ticker map * add litigations rss feed * make openbb-regulators a dependency of openbb-sec * add SIC search * improve ftd and remove BeautifulSoup from SEC dependencies * fix parsing the zip files pre-2009 * ruff * update descriptions * recapture ftd test * tests params * typo * change limit param to 1 in test_sec_stock_ftd * Add didiers to_records method (#5588) * Add didiers to_records * unused import * Bring back polars + do what igor suggested * Make the output consistent with what it was. * Black ? * spelling. oops. almost like we have a pre commit or something * Feature/v4-price-performance: % returns for various horizons, comparable across multiple tickers. (#5618) * coerce string type, add default=None * add price_performance endpoint from FMP * black * extra period in docstring * ruff * forgot one file * Feature/ipo-calendar: V4 IPO Calendar (#5605) * coerce string type, add default=None * add intrinio ipo calendar * fix typo * sort __init__ * fix description * make requested changes * update test params * black * test updates * etf integration * Add disc router and WSJ provider * OBBject extensions (#5612) * changes to core * bug? * docstring * doc * Update credentials.py * fix model_dump * create extensions * fix docstring * doc * revert change query_exc * doc * fix container test * redirect obbject test patch * doc * rename method * move decorator to extension file * rename method extend_obbject * changes in creds model * avoid credential racing * doc * rename prop * doc * doc * remove comment * comment some code * free extension names * docstring * doc * docs * Hotfix/fix-v4-economic-calendar: Add FMP to Econ Calendar and fix some TE bugs (#5580) * coerce string type, add default=None * adds fmp to economic calendar and fixes some things with TE * ruff * etf integration test * missing provider for test * rename te cassette to economic_calendar * fix test * rename tests --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Add stocks disc endpoints (#5630) * Add stocks disc endpoints * Explicit * Lint * Add tests * Bump timeout * Feature/disc router (#5616) * Add disc router and WSJ provider * Lint * Lint * Move endpoints under ETF router * Update etf_performance.py * Add ETF info and sector exposure from FMP (#5620) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Fix linter errors after the merge * Fix more linter errors * Fix failing and add missing tests * Fix integration tests * Fix calendar ipo tests * Add ETF holdings and holding report dates from FMP (#5629) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Add etf holdings and holdings date routes and standard models * Add fmp holdings and holding dates fetchers * Update holdings fetcher to properly handle date object inputs * Add unit tests * Add integration tests * Black after merge * Fix test input data format * Disc router for equities. (#5640) * Disc router for equities. * add tests * Bug fixes in financial statements (#5537) * `validator` to `field_validator` in standard models * Polygon add `ttm` to `period` param * Revert "Polygon add `ttm` to `period` param" * Polygon add `ttm` to param `period` * `EarningsCallTranscript` standard model removed `quarter` param * use `tag` instead of `name` for correct field name * fix url for intrinio income statement * modified intrinio cash flow `transform_data` function * set optional data fields and validate dates * fix insider trading not fetching recent data * linting * refactoring * refactoring * set param alias in fmp stock insider provider model * get all quarter data for intrinio * add `limit` param to `stocks.fa.ins` * refactoring and linting * removed additional comment * linting * re-recorded and fix tests * cash flow standard model field type to `StrictFloat` * Intrinio cash flow model fixed to get all quarters' data * linting * refactoring * financial statement standard model field type to `StrictFloat` * Intrinio financial statement model get all quarter data * set `period` type to `Optional[str]` * add `period` param to balance sheet provider models * add `period` param to cash flow provider models * use alias in model dump * remove `ttm` from `period` param * revamped intrinio financials * fixed incorrect description for `limit` param * modified tests for `balance`, `cash` and `income` * re-recorded tests * skipped intrinio financial statement fetcher tests * Add ETF county weighting command with FMP data (#5645) * Remove code that wrongfully infers the filing date as end of quarter * Add etf countries command with fmp data * Add countries command to etf router * Update sector and country weighting fmp models * Fix docstring typo * Add unit tests and update mock data * Add integration tests for etf.countries * Bring back missing integration tests * Fix economic calendar integration tests * fix missing data in intrinio financials * removed inutile params from Polygon financial statement models * Intrinio IPO overhaul * tests fixed and re-recorded * Add ETF holdings performance with FMP data (#5659) * Add etf holdings performance endpoint * Add tests * Fix failing polygon fetcher tests * Split long holdings lists into chunks and update test data * Change chunk length to 500 tickers * Add stock search from FMP (#5642) Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Feature/v4 pypi (#5579) * improvements to the publish script * move scripts * initial script that builds the package * adjustments on the docs * test pypi workflow * add hour and minute to version * black * ruff * duplicate file * moving files instead * build throught the script instead * update nox file * integration tests workflow * change workflow * fix dev_install * fix in sed cmd * testing the platform only * commenting out the publishing * fix run commands * improvements to the publish script and doc * fix publish script * updating the script and the workflow * feature/v4-pypi nightly (#5589) * init * Update nightly.py * cleanup * init file * not referencing dev_utils * updating obb platform key * revert * Increase warmup time * project name on pyproject and adding the --pre flag on readme * moving to the build folder * fix noxfile * reflecting the moves on the import statements * fix pyproject path * ruff * fix paths * fix super typo * update workflows * moving the pypi terminal files into its folder --------- Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * economy.calendar nasdaq (#5628) * add quandl econcal * unittest * add integration tests * replace   * fix bug TE importance * small fix * remove stuff from quandl * add nasdaq provider * add nasdaq to install files * Update test_economy_api.py * test * quandl leftovers * remove quandl econcal test * lint * replace   * ruff * lint * update nasdaq gmt * validate countries * here * no need for this * fix calendar tests * static * static * remove error * static * readme + website * readme * remove changes TE * typo * fix unittest * fix tests * Update __init__.py * Update economic_calendar.py * revamped model and added helpers for date range --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Feature/v4-dividend-calendar: Adds Nasdaq dividend calendar and moves the command out of fundamental_analysis (#5672) * add nasdaq dividend calendar and move out of fundamental_analysis * black * ruff * add random-user-agent to pyproject.toml * add nasdaq ipo calendar * add nasdaq flag for SPO to IPO calendar * add spo test param * black * dividend test * fix transform_query - nasdaq_calendar_ipo * bring back different headers for ipo calendar * remove references to test * Add disc endpoints (#5660) * Add Quandl top retail * Add tests * Add Seeking Alpha * Add Filings * Change Provider * Fix test * Add dev_install * static * static correct * y u forget me * updated deps * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * using dev install (#5673) * Expanding the `fixedincome` menu (#5655) * models and fetcher * making the fetcher visible * std model * adding the command * improvements to the models * typo * adding the command * imrpovements to dwpcr * standard model for ecb int rates * adding the fetcher for fred * standard model of ice bofa * add ice_bofa command * ruff * ice bofa fetcher * moody std model * moody * std model * add cp command * unused import * cp * spot * ruff * hqm * tmc * ffrmc * tbffr * ruff * typing fixes * buggy dates * fred fetcher tests * ruff * adding ecb as a provider * adding new provider related stuff * adding the new command eu_ycvr * models * test for ecb fetcher * Feature/v4 fixedincome int tests (#5661) * integration tests * happy ruff * mini adjustment * ruff * typo * verbose type * fix tests * docstrings everywhere and an happy pydocstyle * fix tests * Feature/user-cache-dir: Add User Preference for the Cache Directory (#5621) * add user preference for storing cached data * ruff * fix tests? * fix test key error..? * etf integration test fix * add cache dir to SEC * black * improve docs structure for V4 (#5586) * improve docs structure for V4 * moving over changes * Add Docs to the navbar * add some, re-order sidebar * fix sentence * add docs install to source instructions * insert a couple of links, fix a typo * big terminal docs usage revamps * improve toggle component for tutorials * get rid of TOCs for all terminal docs for consistency and simplicity * improve platform docs * improve bot docs content structure * remove index from bot docs * improve ON THIS PAGE to only display TOC if at least 1 element * make edit this page text and icon on same line * add author and date to docs * add basic syntax page to usage * sidebar order for usage section * move api start command to the top with the import python import * some install page additions * small improvement * refactor routines section * Update introduction-to-routines.md * Update pipeline-of-commands.md * Update introduction-to-routines.md * Update routines-for-power-users.md * Update community-routines.md * update keyboard hotkey macros * askobb page * Update askobb-feature.md * Update index.md * Update index.md * Update index.md * Update index.md * fix images * remove HeadTitle from all files where it exist * get rid of extra spacing in markdown * small update * small edit * need index at the start because of main path when homepage of docs * use openAI to create SEO for front matter on my behalf * remove table of content from sdk page * finish improving metadata SEO for SDK docs * update duplicate header * update HeadTitle to be more specific on product * remove index from bot telegram reference * delete duplicated title for platform reference * another update * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * start PR so screenshots can get attached via GitHub website * Update qa.md * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * Update crypto introduction.md * titles * another title * Update crypto dd.md * Update defi.md * Update disc.md * Update nft.md * Update onchain.md * Update ov.md * Update introduction.md updates URL * Update introduction.md add HeadTitle * Update ba.md * Update comparison.md * Update dark-pool-shorts.md * Update disc.md * fix docs (#5646) * Update fa.md * Update gov.md * Update ins.md * Update tradinghours.md * Delete website/content/terminal/menus/stocks/options/screener.md * Update Options introduction.md * Update screener head title * Update screener TOC * Update econometrics.md * Update economy head title * Update etf.md * codespell * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Contributing guidelines (#5615) * intro section * what's expected sections * improve sections * improve sections and move how to add a data point * moving qa under contributor * better intro * moving the sharing section * better expectations * small intro to the contributor guidelines * moving things under the contributor section * there is no pre commits on the platform yet * dependency management * best practices for extensions * typo * collapse options subfolder * codespell * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update fixedincome.md * url * Update forecast.md * Update settings.md (#5665) * Update forex.md * fix front matter (#5667) * Fix conflict markers that got into markdown during previous merges * Fix front matter list formatting * Fix typo * small thing * fix hyperlinks * Update .codespell.ignore * output_type options * Architectural considerations * Update sidebar to hide pro section by default * Minor copy changes * TET pattern * import statements * clarification on preferences * Minor copy changes * Lint markdown and python * fix: open index on collapsible root elements * remove old content * options title * Fix linting errors * Refactor sidebar label to url mapping condition --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Add multi-ticker support to etf_countries (#5670) * add multi-ticker support to etf_countries * remove commented-out lines * normalized percent points * percent -> percentage * Fix Nasdaq Econ Calendar Fetcher (#5668) * fix nasdaq econ cal request * more html tags * add random-user-agent to pyproject * another edge case - 24H -> 00:00 * Feature/v4-unusual-options: Adds unusual options endpoint. (#5677) * add unusual options fro Intrinio * test params * move sorting * Change type * update FMP fetcher to use the V4 endpoint (#5681) * Fix price performance not parsed correctly when there is only 1 ticker (#5678) * Add crypto search standard model and FMP data for it (#5679) * Apply renaming to news data (#5684) * inegration complete * reformatted for black * fix ruff issues * revised integration * changes to versions in pyproject.toml and updated lock files * Rename models * Update tests * Fix typos here and there * Update routers * Apply rename to ultima * Properly mock api key * Mock ultima api key --------- Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Feature/v4-market-snapshots: Adds full market snapshots (#5473) * add stocks market snapshots from fmp * add fmp fetcher test * unused imports * add polygon to market_snapshots * update fmp market_snapshots * black * pydantic2 things * updates * change validate_obj to model_validate * polygon cleanup * tests * descriptions * black * data description * minor adjustments, using less local variables, improving readability and removing pandas * better structure * minor adjustments * lint * fix int tests --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Add NBBO Quotes, with historical, to `obb.stocks.quote()` (#5617) * coerce string type, add default=None * add polygon stock quote * limit cleanup * add greater/less than to params * limit param * black * tests * fix tests * test_etf * rename model and function to NBBO * add standard model for nbbo * improve standardization * not redifining builtin max * fix input params * integration test params * removing unused import Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * revamped code * re-recorded nbbo test * added symbol validator * added alias in field * Stock news -> Company news --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * hotfix/update-quandl-to-nasdaq: Merge Quandl + Nasdaq (#5682) * merge quandl nd nasdaq * dev_install.py * test param name * economy python integration test * Add more input types to data processing commands (#5453) * adding more supported types to data processing commands * ruff * removing unused import * docstrings * data processing types covertion * data description * test filters * ruff * fix package builder tests * ruff * removing print * Add stocks/dps module (#5638) * short volume * pyproject missed * add sec short interest with days to cover * Add FINRA OTC endopoint * some tests * rest of unit tests * Integratin test scripts * dev install * linters caught by pre commit * lines too long * Last test files * maybe it needs a lock file? * thanks pratty * Maybe ill actually listen to pratty next time * sec test date freeze * I cant hit buttons * re record tests * tests 3 * Stockgrid test * regen int test * more testing * lint * moved these fns * dis killing me * one more test * last one * Update integration tests * Fix tests picking up wrong dps route --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename Forex to Currency (#5687) * restore fields as optional (#5686) * Rename Crypto (#5689) * added `crypto.price.historical` * static * fix tests * fix incorrect label * Move model from sec to finra (#5692) * Update toml * fixed deps * add openbb-etf lock file * cleanup * cleanup (#5694) * Rename Fixed Income (#5695) * Rename Fixed Income * Add routers * Rename stocks to equity (#5688) * Rename stocks folder * Rename openbb_stocks package * Rename routers * Reroute equity menu * Update routes based on feedback * StockNews -> EquityNews * StockInfo -> EquityProfile * Rename Equity calendars * Equity peers rename * Rename discovery * Rename fundamental * Rename price command models * Rename shorts * Update charting router * Fix seeking alpha upcoming release date * Fix linting errors * Update tests * Fix tests * Skip econometrics api tests because it's python only * Update integration tests and test data * Historical analyst estimates * Skip cboe options chain test. Unable to record vcr cassette * re-record cboe cassettes * Document CBOE unit test creation caveats --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Feature/files-for-igor: Adding a few standard models for Igor (#5699) * add some standard models for Igor * codespell * update descriptions * Add devtools metapackage (#5703) * Add openbb-devtools metapackage * adding devtools to the dev_install script --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Rename econometrics commands to be more verbose (#5702) * Expose command to model map (#5706) * Rename ta qa (#5708) * Rename ta folder * Rename ta to technical * Rename qa folder * Rename qa to quantitative * Rename the actual routes in quantitative * Equity cleanup (#5707) * cleanup * static * renaming to equity cc @the-praxs * Proof reading --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Don't enforce imperative for first word of the docstring * Remove ultima from default extensions * Rename `economy` and create `index` extension (#5705) * renamed economy and re-recorded tests * static * market indices * european indices * fred indices * index constituents * tests * correct package name * oops * static * linting * Move COT commands to regulators * Rename economy.list to available_indices * Rename GDP models and clean up * Fix charting tests * Drop _indices from available_indices command * Fix obbject to_dict test --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename etf/disc (#5715) * Docs/v4-working-docs: PR to Work on V4 Docs (#5693) * Revert changes related to pydantic2 made into v3 code * Revert fred model changes in v3 * Revert pydantic2 databento model changes in v2 * Update some names and v3 lock file * Clean up openbb/package before the beta release * Platform publishing procedure (#5701) * update instructions * introducing the version script * publish message * fix platform path * reflecting version changes * getting version from installed packages instead * removing toml from dependencies * Changes to get `a7` out (#5697) * changes to get a7 out * etf menu on the pyproject.toml * poetry lock * bump `openbb-etf` to `a5` to match version * updated deps * removing ultima * removing references to a4 cc @the-praxs * Bump index menu version * poetry lock --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Update publishing instructions * Bump core dependencies in extensions and providers * Add changes to the publish script following the beta release * Update the versions in static extension map and openbb metapackage --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Igor R… * [BugFix] Improve Warning For Invalid Defaults Key In `user_settings.json` (#6651) * improve warning for invalid defaults key in user_settings.json * didn't add to the commit * Merge branch 'main' into 'develop' (#6646) * add snowflake integration video (#6339) * [HotFix] Fix broken URLs in docs page. (#6368) * Fix broken URLs * use full URL to other docs pages. * [Release] 4.2.0 (#6422) * [Docs] Remove Reference to `to_chart` in OBBject. (#6096) * remove reference to to_chart in OBBject. * put chart description back in OBBject properties * [Feature] - Create openbb assets folder (#6101) * create openbb assets folder * fix unittest * rebuild --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [BugFix] Fixes to_df() where the date series contains multiple TZ-offsets. (#6099) * allow mixed utc offset in a tz-aware date column * enforce ascending from all providers for price.historical * fix tests * add comments and apply treatment to basemodel_from_df before JSON output * yfinance consistency * add unit test * add unit test * better test * ruff --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Update the quantitative extension to make more sense (#6087) * Split out a rolling submenu for the rolling functions * Make a performance and a stats submenu. * Test the statistics functions * lint * lint * dupe test * pylint * ruff * Try tests quick * black magic signature funcs * fix my custom tests * Fix the existing imports/urls * push the api update * okay I figured out whats going on * this should be all of them * Correct docstringing examples --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [BugFix] Fix ECB Yield Curve (#6108) * fix ecb yield curve * standard model update * Update unit-test workflow to check for changes to openbb_platform (#6109) * [Bug fix] - Fix package mypy (#6110) * fix: package mypy * types * black * [Feature] - Equity router descriptions & examples (#6103) * feat: equity/calendar * feat: compare router * fix descriptions * darkpool + discovery * fix paragraph issues * fix descriptions * fundamental part 1 * fundamental part2 * transcipts * ownership * fix * price * shorts * Update darkpool_router.py * minor fix * shorts examples * examples * ruff * black --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Feature] - Add `exception_handler` decorator to static (#6112) * add exception handler decorator * add exception handler decorator code * updated static * rebuild to fix docstring indentation --------- Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * update extensions list (#6114) * add missing field descriptions to yfinance equity price historical (#6116) Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * remove charting extension env var (#6118) * [BugFix] Fix Company News (#6111) * fix company news * update tests * multiple symbols for polygon * don't include pageSize in Benzinga querystring, fixed as 100 * remove extra space * black * unused imports * make benzinga test cassette smaller * missing params * clear empty strings --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [BugFix] Allow Multiple Symbols in `equity.fundamental.metrics()` from `yfinance` (#6124) * allow multiple symbols in key_metrics from yfinance * field order thing * remove unnecessary function (#6125) * [Docs] Update OpenBB Copilot docs (#6106) * WIP: Tweak description. * WIP: Experimenting with react-player * WIP: Add copilot docs. * fixes videos width/height * WIP: Refine videos and copy. * WIP: Add last videos and sections. * Add bring-your-own-copilot section. * Tweak grammar. * Add copilot link. * Fix typos. --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * [Enhancement] Add Previous Close to DATA_DESCRIPTIONS (#6120) * add data description for previous close * ..just the one * update the model tripped by this change --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * added australia as a country also (#6131) * [Bug fix] - Fix regulator cik map standard model (#6129) * Fix regulator cik map standard model * fix description * Update cik_map.py * increase timeout to 30 (#6115) Co-authored-by: James Maslek <jmaslek11@gmail.com> * clean up some v3 deps (#6105) * clean up some v3 deps * forgot we need to do the requirements txt files * not sure it matters, but run ruff + black * am addicted to bug fixes --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [Bug fix] - explicit multiple items docstring (#6127) * explicit multiple items docstring * rebuiild * rebuild again --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * [Feature] Pretty Pydantic `ValidationError` exceptions (#6130) * fix validator in fmp IndexHistorical model * make ValidationError pretty * modify arg error * linting fmp IndexHistorical * black * remove unused code * tmx etf info (#6132) Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> * [Feature] - Platform V4 Markdown Generator V2 (#6094) * add recent `openapi.json` * fix data types in models * removed `openapi.json` * set default date value as None in PolygonCurrencyPairs class * add function to generate reference.json file * reworked function to improve readability * reword function to add seo metadata * add functions for creating markdown sections * add code to extract data card markdown title * add additional functions for generating index and data models file * extract first sentence of the description for cards * code cleanup and documentation * linting * linting polygon models * add openbb import statement in create_reference_markdown_examples function * add POST method functions * cleanup; reworked generate_reference_index_files function * moved development section to 7th position in the sidebar * fix POST function params default value add standard flag to QueryParams and Data fields cleanup * add type expansion from package_builder.MethodDefinition * sort data models cards alphabetically make printing less verbose * make MAX_CARDS global display less content in cards in Commannds section * cleanup * Remove '_' from the cards under Commands section * " to ' in econometrics/causality * replace ' with " in ReferenceCard for reference dir index files * remove extra . from the quantile function description * shoutout to @deeleeramone for finding POST method description bug! * set correct value for standard field * handle BaseModel types in provider data fields * unit tests for the platform markdown generator v2 * yeet 'Default' and 'Optional' columns in the 'Data' section * last minute bug fix * add info for multiple symbols * make multiple items info same as platform static * organize sections properly * sort reference sub-directories alphabetically * extra space in 'OBBject extra' description * add type expansion for fields with multiple items POST method cleanup --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * [Docs] Adds Example Notebook for the Implied Earnings Move (#6128) * adds example notebook for the implied earnings move * remove commented out line --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * [Feature] - Sync with new openapi.json (#6137) * feat: create data tabs * fix: uncomment * fix: remove unecessary comment * sort side bar * comment * uncomment * use .dev functions.json + clean traverse * fix futures example * fix example * point to .co * Fix the v3 markdown generation workflow (#6138) * fix workflow * debug time * see if the docs generate at least * ahhhh i found it * getting there * put the test first * some keys cleanup * small change to error message * update functions.json (#6140) * fix intraday check in charting ta_class (#6119) Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * [BugFix] Display EconDB as source for macro (#6143) * [BugFix] Disable Intrinio `InstitutionalOwnership` model (#6142) * disable fetcher in init and fetcher tests * disable provider test params from equity python and api tests * updated static * add more examples into findSymbols (#6139) Co-authored-by: James Maslek <jmaslek11@gmail.com> * [BugFix] Fix SEC ETF Holdings Parsing Exception (#6121) * fix etf holdings * linting * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/update xl docs (#6145) * remove print * update obb.get docs * example * md lint * fix get reference (#6147) * [BugFix] Filter OECD data using `start_date` and `end_date` parameters (#6144) * move constant dicts to constants.py filter by start_date and end_date * black * black again again * Merge 'main' into 'develop' (#6151) * Release/3.2.4 (#5696) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * 3.2.3->3.2.4 * Changelogs * new changelog --------- Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> * Release/4.0.1 (#5840) * test * ultima description (#5541) * Updating showcase page (#5543) * updating showcase page * use sdk instead * add new bot command autopost docs (#5530) add new bot command autopost docs to docs.openbb.co Co-authored-by: James Maslek <jmaslek11@gmail.com> * Hotfix/ultima improvements (#5553) * tweaks for monetization * fix linting issue * fix: Modify 'load' behavior to append data to existing sheet (#5503) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Fixed 'worksheet not found' error during export to an existing sheet * Changes: * Now if the sheet exists in the xlsx file it will ask the user if he wants to replace/append/create new sheet --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * added platform API integration test to Nightly build (#5571) * Add columns to `stocks/search` (#5565) * Add columns to `stocks/search` isin, cusip, figi, composite_figi, shareclass_figi * Update test_search[False].txt * Update test_search[True].txt * Delete tests/openbb_terminal/stocks/cassettes/test_stocks_helper/test_search.yaml * Create test_search.yaml --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * updating ultima urls (#5587) * fix: A value is trying to be set on a copy of a slice from a DataFrame #5582 (#5591) * Update README.md (#5598) * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * fix docs (#5646) * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update settings.md (#5665) * fix front matter (#5667) * #5633 adding comma every 1000 (#5652) * #5633 adding comma every 1000 * pylint --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Hotfix/reports model render report sanitize inputs (#5669) * Adding more robust special character handling to create_output_path().Addresses https://github.com/OpenBB-finance/OpenBBTerminal/issues/5299 * Running black linter on code to conform to OBB style guides. --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * hotfix/fix-gov-histcont: Fix #5650 - /stocks/gov/histcont (#5676) * fix histcont * some cleanup * remove sort line * 12-31 not 12-12 * columns_keep_types * remove space in regex (#5675) * Pin openai (#5685) * Clarified stocks/ta empty recom object message (#5468) * Clarified stocks/ta empty recom object message * black * lint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * improved market cap value extraction (#5169) * improved market cap value extraction * pylint --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Release/3.2.4 (#5704) * 3.2.3->3.2.4 * Changelogs * new changelog * OpenBB Platform v4 (#5225) * change location * check something * add cache * fixed auth w/@IgorWounds and @montezdesousa * fixes for econometrics * include Darren auth suggestions * some routers included if dev + chg hub backend var * coverage router should not be here * update docker readme * forgot to check auth here * Change extension imports * update docstrings and readme * headers function wasnt being called, just referenced * relative import * econometrics add headers everywhere * Fix QA * Fix TA * Fix test * Fix python interface QA and TA * Lint * Cleanup * Change path * make the changes and some etf models * tests for command_runner * ruff * solving naming issues on pytest * Update some docstrings, fix typos and lint * solving econometrics instantiating wrong openbb * chaging the way pytest runs * messing around with the imports * ruff * Change template to add platform considerations (#5533) * change template to add platform considerations * @the-praxs suggestions * solving __pycache__ issue * removing typo * ci yml * making linters happy (i guess) * Improve Omega Ratio and docstrings * chaging pro validation hash * ruff * Fix OLS Summary and lint * Add OECD Provider for economy extension (#5534) * Add record to docs * update a couple of cboe models * Fix econometrics bugs. Make tests pass. Lint. * black * ruff * pydantic v2: remove deprecated Extra * pydantic v2: self.dict -> self.model_dump * revert pydantic * revert the revert * try 1: pin urllib3 < 2 * Revert "try 1: pin urllib3 < 2" This reverts commit3736c311cb. * Revert dep * Fix * re-lock * Skip all tests when doing cspell in pre-commit * Resolve linter errors * Add OECD to install script * Add OECD * Resolve more linter errors * Exclude static files of v4 python from ruff * More linting * Another attempt to resolve even more linting errors * Change how Literal is used * ticker. symbol. consistent. @piiq * change ticker field in Stock Search to is_symbol * Update Cboe model for stocks_search -> is_symbol parameter. * Fix issue * Lint * Small QA to rename SDK to Platform (#5544) * SDK -> Platform in docs * renamed in core * renamed in openbb `init` * `sdk` variable renamed as `platform` --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * `validator` -> `field_validator` in standard models * Standard convention for multi-ticker symbols (#5549) * standardize symbol input param in forex and crypto historical data * static * linting * Fix stock_search integration test params * Update dependencies and linting on the CI (#5550) * Remove ruff and black from platform dependencies * Update codespell configuration * Lint python code * Add toml and tomli to root dev dependencies * Update requirements.txt files * Fix buggy docstring in python package methods (#5548) * fix buggy docstring for methods * remove space * fix typing * avoid name collision with validator * Revert "avoid name collision with validator" This reverts commit8a30a44555. * typing * rebuild * python 3.8, ParamSpec not available * lint * ruff noqa * Merge with develop (#5551) * Charting extension integration tests (#5547) * initial proposal for integration tests on the charting extension * int tests for charting generation * python generator * ruff * boilerplate templates * python tests * tests for the api * using body instead so data don't get redefined * unit tests for coverage * ruff * docstrings * unnecessary access to keys() * Add trading economics economic calendar * dev install * Data Models disposition on the website (#5538) * pydantic v4 * flat structure * md files * Revert "md files" This reverts commitbd2170e2ad. * improve command descriptions * nice title and description * human readble data model names on left panel * implementation details section * content markdown files * markdown versioned files * showcase page * updates --------- Co-authored-by: tehcoderer <me@tehcoderer.com> * everything except tests * fix `datetime.date` import in fetcher test * modified url to remove `api_key` placeholder * record test * api key is called c here * fixed fetcher test for api key * recorded tests * refactor * life is ruff * codespell * Make Intrinio options chains great again (#5540) * add multithreading * cleanup * linting * use dateutil.parser * removed `TICKER_EXCEPTIONS` * modified `date` and `type` fields in standard model * set alias for `date` and `type` to match standards * static * static * Hotfix/fix post tests (#5555) * Fix econometrics * Fix ta * Fix qa. Remove intrinio to not be rate limited * Lint * Fix typo * obbject tests (#5558) * obbject tests * ruff * fix dev_install * fix unittests * black on nox * black on nox * nox * fix fetcher test so it can compare dates * fix intrinio tests * ruff * change to model_dum() instead (#5561) * Passing tests (#5560) * Passing tests * fix options * Fix most tests and bugs * fix forex missing params * make symbol upper in polygon fx pairs * fix fixedincome integration tests (#5564) * Fixing charting api integration tests (#5562) * fixing charting api integration tests * black * fix stocks less five API fails * fix the 5 failing stocks integration tests * recapture fmp stock news unit test * fix fmp forex api test * couple more forex integration fixes * changing the request to always use the legacy session. @jmaslek this is was broken for 3.8 and 3.9; with this change apparently all versions work - lemme know if you see any issue with this change * ruff * fix ta * add missing param * fix testers for the api * fix globalnews to use images instead of image * remove unncessary pandas import * econcal int tests * update gitignore * fix get_querystring to support lists * add missing parameters --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> * Stock Historical standardization and UX improvements (#5457) * polygon add interval standard param * attempt at standardization * Alpha Vantage params standardization * rename `get_intervals` and fixed bug for extracting wrong value * missed changing it in `extract_data` * linting * polygon cleanup * modified `start_date` & `end_date` type to `datetime` from `dateType` * standardized intrinio stock historical params * fixed yfinance * linting * revert start and end date to dateType from datetime * fix alpha vantage * changed param * fix intrinio infinite loop * `validator` is `field_validator` * revert time params and fixed intervals * `outputsize` alias set in `Field` * set interval description using in-build dict * yfinance stock param standardization * static * intrinio cleanup * Polygon add api params as `PrivateAttr` * modified yfinance params to `PrivateAttr` * intrinio remove overriding date params * fixed description for AV adjusted param * fix alpha vantage intraday not working * re-record and pass unit tests * pass integration tests * Update test --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * Fix econcal endpoint (#5567) * fix econcal for python interface * fix econcal tests * fix non supported json output * Fixes FMP index endpoint to get 1 day interval data (#5535) * fix FMP endpoint for getting index data for `1day` interval * fix `open` type to prevent validation error * modifed `validator` to `field_validator` * type of fields is `StrictFloat` * re-record and pass test * linting * `validator` -> `field_validator`, a3'd everything * Fix regression in tests. Lint * updating the integration test actions * Fix typo * Fix typo * Fix import * Publish versions `a3` to Pypi (#5568) * bump versions and script to publish * small improvements * uncomment exception * openbb * publishing guidelines * improve docs * add providers to economy api * make symbol required in stock_quote * Fix keys * Fix oecd * add comma * revert * Add quotes * Sleep * Improve tests * Improve * Feature/query transform (#5566) * inject query into transform_data * swap query and data * update missing fetchers * last test failing * sig test fetcher * black * av add `query` to `transform_data` call * transform_data: missing refactoring * fix uvicorn command in the doc * Automated examples (#5576) * Automated examples * Fix bug * Lint * static assets built on 3.8 * Revert "static assets built on 3.8" This reverts commitfb82ff7bd9. * remove assets * static assets on 3.8 * static assets on 3.8 * Wrap in quotes * Improve wrap * minor fix * rebuild 3.8 * Fix bug * Fix edge case * Lint * rebuild --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> * use SecretStr for sensitive fields (#5578) * use SecretStr for sensitive fields * fix * docstring * Add tests for provider (#5583) * Add tests for provider * Test standard models * Lint * Fix standard model issues. Co-authored-by: @the-praxs * linting * `symbol` -> `is_symbol` in `economy.index_search` * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * feature/v4-biztoc-provider: Adds Biztoc provider and GlobalNews (#5546) * add biztoc provider * duplicate field * black * request headers * recapture test * move stuff around * add integration tests * duplicate OECD entry in dev_install * duplicate entry for oecd in pyproject.toml * Add Biztoc to workflow * update readme: credentials * Add Preferences to README * improve tests * fix biztoc * obbject pylint * Bug fix: serializ SecretStr before dumping to json * export credentials as json (#5592) * Check for wrong, changed, or outdated params. (#5597) * Improving `economy.cpi` for the FRED data (#5602) * remove multiindex using coding magic * Update field descriptions --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Improve error message. * Improve * Test tests (#5607) * Test tests * Add test * 4.0.0a4 PyPI publishing (#5608) * changes to publish * fix mini conflict * typo * cleaned `descriptions.py` * fix description in `cpi.py` * Add ETF extension to v4 (#5609) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add ETF historical price from yfinance (#5610) * Add etf extension with search data model * Add FMP ETF search * Add fetcher tests * Add etf historical price standard model and route * Add etf historical data from yfinance * Add unit tests * Fix linter error. Organize imports * Update test data * Revert common descriptions erased by CPI PR * remove `symbol` from data for `stocks.ca.peers` * Test docstrings (#5613) * Test docstrings * fix minor bugs w/@IgorWounds * static only w/@IgorWounds * fix `importance` param in `economy.econcal` * right static only w/@IgorWounds * Fix econcal and add tests to noxfile * fix econcal static * re-record --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Clean up the newly created ETF extension (#5611) * Add ETF to dev_install bundle * Add integration tests for openbb-etf * Patch integration test generator scripts to produce lintable code * Add py.typed markers for extensions * user preferences descriptions (#5593) * user preferences descriptions * typo * Feature/v4-sec-provider: Add SEC provider to V4 (#5556) * coerce string type, add default=None * add sec provider and FTD function * update description * ruff * data model definitions in standard model already * duplicate oecd entries in dev_install and pyproject * actually commit * integration test * add stock search to SEC * add company filings for SEC provider * integration tests * remove duplicated line * ruff * **kwargs in Transform Data * some helper functions for later * black * add helper for mutual fund and etf lookup * add some SEC lookup helpers to a new regulators extension * black * ruff * fix test param * take institution filter out of sec stock_search * ruff * remove URL that codespell doesn't like * add cik-to-ticker map * add litigations rss feed * make openbb-regulators a dependency of openbb-sec * add SIC search * improve ftd and remove BeautifulSoup from SEC dependencies * fix parsing the zip files pre-2009 * ruff * update descriptions * recapture ftd test * tests params * typo * change limit param to 1 in test_sec_stock_ftd * Add didiers to_records method (#5588) * Add didiers to_records * unused import * Bring back polars + do what igor suggested * Make the output consistent with what it was. * Black ? * spelling. oops. almost like we have a pre commit or something * Feature/v4-price-performance: % returns for various horizons, comparable across multiple tickers. (#5618) * coerce string type, add default=None * add price_performance endpoint from FMP * black * extra period in docstring * ruff * forgot one file * Feature/ipo-calendar: V4 IPO Calendar (#5605) * coerce string type, add default=None * add intrinio ipo calendar * fix typo * sort __init__ * fix description * make requested changes * update test params * black * test updates * etf integration * Add disc router and WSJ provider * OBBject extensions (#5612) * changes to core * bug? * docstring * doc * Update credentials.py * fix model_dump * create extensions * fix docstring * doc * revert change query_exc * doc * fix container test * redirect obbject test patch * doc * rename method * move decorator to extension file * rename method extend_obbject * changes in creds model * avoid credential racing * doc * rename prop * doc * doc * remove comment * comment some code * free extension names * docstring * doc * docs * Hotfix/fix-v4-economic-calendar: Add FMP to Econ Calendar and fix some TE bugs (#5580) * coerce string type, add default=None * adds fmp to economic calendar and fixes some things with TE * ruff * etf integration test * missing provider for test * rename te cassette to economic_calendar * fix test * rename tests --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Add stocks disc endpoints (#5630) * Add stocks disc endpoints * Explicit * Lint * Add tests * Bump timeout * Feature/disc router (#5616) * Add disc router and WSJ provider * Lint * Lint * Move endpoints under ETF router * Update etf_performance.py * Add ETF info and sector exposure from FMP (#5620) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Fix linter errors after the merge * Fix more linter errors * Fix failing and add missing tests * Fix integration tests * Fix calendar ipo tests * Add ETF holdings and holding report dates from FMP (#5629) * Add ETF info from FMP * Add integration tests * Add unit tests * Add etf sectors endpoint * Add etf sectors fmp endpoint * Omit nested sector list from fmp info data * Update tests and test data * Update test data * Specify provider explicitly in integration tests * Update tests * Skip yfinance etf historical test * Add etf holdings and holdings date routes and standard models * Add fmp holdings and holding dates fetchers * Update holdings fetcher to properly handle date object inputs * Add unit tests * Add integration tests * Black after merge * Fix test input data format * Disc router for equities. (#5640) * Disc router for equities. * add tests * Bug fixes in financial statements (#5537) * `validator` to `field_validator` in standard models * Polygon add `ttm` to `period` param * Revert "Polygon add `ttm` to `period` param" * Polygon add `ttm` to param `period` * `EarningsCallTranscript` standard model removed `quarter` param * use `tag` instead of `name` for correct field name * fix url for intrinio income statement * modified intrinio cash flow `transform_data` function * set optional data fields and validate dates * fix insider trading not fetching recent data * linting * refactoring * refactoring * set param alias in fmp stock insider provider model * get all quarter data for intrinio * add `limit` param to `stocks.fa.ins` * refactoring and linting * removed additional comment * linting * re-recorded and fix tests * cash flow standard model field type to `StrictFloat` * Intrinio cash flow model fixed to get all quarters' data * linting * refactoring * financial statement standard model field type to `StrictFloat` * Intrinio financial statement model get all quarter data * set `period` type to `Optional[str]` * add `period` param to balance sheet provider models * add `period` param to cash flow provider models * use alias in model dump * remove `ttm` from `period` param * revamped intrinio financials * fixed incorrect description for `limit` param * modified tests for `balance`, `cash` and `income` * re-recorded tests * skipped intrinio financial statement fetcher tests * Add ETF county weighting command with FMP data (#5645) * Remove code that wrongfully infers the filing date as end of quarter * Add etf countries command with fmp data * Add countries command to etf router * Update sector and country weighting fmp models * Fix docstring typo * Add unit tests and update mock data * Add integration tests for etf.countries * Bring back missing integration tests * Fix economic calendar integration tests * fix missing data in intrinio financials * removed inutile params from Polygon financial statement models * Intrinio IPO overhaul * tests fixed and re-recorded * Add ETF holdings performance with FMP data (#5659) * Add etf holdings performance endpoint * Add tests * Fix failing polygon fetcher tests * Split long holdings lists into chunks and update test data * Change chunk length to 500 tickers * Add stock search from FMP (#5642) Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Feature/v4 pypi (#5579) * improvements to the publish script * move scripts * initial script that builds the package * adjustments on the docs * test pypi workflow * add hour and minute to version * black * ruff * duplicate file * moving files instead * build throught the script instead * update nox file * integration tests workflow * change workflow * fix dev_install * fix in sed cmd * testing the platform only * commenting out the publishing * fix run commands * improvements to the publish script and doc * fix publish script * updating the script and the workflow * feature/v4-pypi nightly (#5589) * init * Update nightly.py * cleanup * init file * not referencing dev_utils * updating obb platform key * revert * Increase warmup time * project name on pyproject and adding the --pre flag on readme * moving to the build folder * fix noxfile * reflecting the moves on the import statements * fix pyproject path * ruff * fix paths * fix super typo * update workflows * moving the pypi terminal files into its folder --------- Co-authored-by: teh_coderer <me@tehcoderer.com> Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * economy.calendar nasdaq (#5628) * add quandl econcal * unittest * add integration tests * replace   * fix bug TE importance * small fix * remove stuff from quandl * add nasdaq provider * add nasdaq to install files * Update test_economy_api.py * test * quandl leftovers * remove quandl econcal test * lint * replace   * ruff * lint * update nasdaq gmt * validate countries * here * no need for this * fix calendar tests * static * static * remove error * static * readme + website * readme * remove changes TE * typo * fix unittest * fix tests * Update __init__.py * Update economic_calendar.py * revamped model and added helpers for date range --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * Feature/v4-dividend-calendar: Adds Nasdaq dividend calendar and moves the command out of fundamental_analysis (#5672) * add nasdaq dividend calendar and move out of fundamental_analysis * black * ruff * add random-user-agent to pyproject.toml * add nasdaq ipo calendar * add nasdaq flag for SPO to IPO calendar * add spo test param * black * dividend test * fix transform_query - nasdaq_calendar_ipo * bring back different headers for ipo calendar * remove references to test * Add disc endpoints (#5660) * Add Quandl top retail * Add tests * Add Seeking Alpha * Add Filings * Change Provider * Fix test * Add dev_install * static * static correct * y u forget me * updated deps * static --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * using dev install (#5673) * Expanding the `fixedincome` menu (#5655) * models and fetcher * making the fetcher visible * std model * adding the command * improvements to the models * typo * adding the command * imrpovements to dwpcr * standard model for ecb int rates * adding the fetcher for fred * standard model of ice bofa * add ice_bofa command * ruff * ice bofa fetcher * moody std model * moody * std model * add cp command * unused import * cp * spot * ruff * hqm * tmc * ffrmc * tbffr * ruff * typing fixes * buggy dates * fred fetcher tests * ruff * adding ecb as a provider * adding new provider related stuff * adding the new command eu_ycvr * models * test for ecb fetcher * Feature/v4 fixedincome int tests (#5661) * integration tests * happy ruff * mini adjustment * ruff * typo * verbose type * fix tests * docstrings everywhere and an happy pydocstyle * fix tests * Feature/user-cache-dir: Add User Preference for the Cache Directory (#5621) * add user preference for storing cached data * ruff * fix tests? * fix test key error..? * etf integration test fix * add cache dir to SEC * black * improve docs structure for V4 (#5586) * improve docs structure for V4 * moving over changes * Add Docs to the navbar * add some, re-order sidebar * fix sentence * add docs install to source instructions * insert a couple of links, fix a typo * big terminal docs usage revamps * improve toggle component for tutorials * get rid of TOCs for all terminal docs for consistency and simplicity * improve platform docs * improve bot docs content structure * remove index from bot docs * improve ON THIS PAGE to only display TOC if at least 1 element * make edit this page text and icon on same line * add author and date to docs * add basic syntax page to usage * sidebar order for usage section * move api start command to the top with the import python import * some install page additions * small improvement * refactor routines section * Update introduction-to-routines.md * Update pipeline-of-commands.md * Update introduction-to-routines.md * Update routines-for-power-users.md * Update community-routines.md * update keyboard hotkey macros * askobb page * Update askobb-feature.md * Update index.md * Update index.md * Update index.md * Update index.md * fix images * remove HeadTitle from all files where it exist * get rid of extra spacing in markdown * small update * small edit * need index at the start because of main path when homepage of docs * use openAI to create SEO for front matter on my behalf * remove table of content from sdk page * finish improving metadata SEO for SDK docs * update duplicate header * update HeadTitle to be more specific on product * remove index from bot telegram reference * delete duplicated title for platform reference * another update * Hotfix/econometrics export filename fix (#5508) * fix: Modify 'load' behavior to append data to existing sheet Details: - Added logic to detect existing sheet and append data if present. - There is no direct way to append on the sheet, so I am reading the sheet to get the last row number and then writing after that row number. Resolves: #5472 * Added --export option for exporting to a desired file in /econometrics menu * Added a -f/--file option to provide the filename for export. Made -t/--type and -f/--file mutually exclusive. If -f is not given, -t is required and the filename will be generated based on the time and module. * Revert `helper_funcs.py` to original state * Made some arguments not required. * Minor changes asked by @deeleeramone * No sheet name * black --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * FIX #5600 Updated the Twitter logo to X logo (#5601) * Change Ultima paragraph (#5624) * change ultima paragraph * remove old paragraph * Update CONTRIBUTING.md (#5623) * mobile line-brake fixed (#5604) In the mobile view (media max 400px ), the text line "Installation >>" appears broken into smaller segments. Co-authored-by: James Maslek <jmaslek11@gmail.com> * start PR so screenshots can get attached via GitHub website * Update qa.md * Docs/terminalpro and improvement (#5622) * add first iteration of content for Terminal Pro * Update index.md * Update dashboards.md * Update folders.md * Update grouping.md * Update report.md * Update templates.md * Update quick-start.md * Update index.md * Update index.md * Update home.md * Update news.md * Update index.md * Update index.md * Update index.md * Update data-provider.md * Update chat-with-widget.md * Update data-manipulation.md * Update forecasting.md * fix: images self closing tags * fix: only pro visitors can see pro * inter font * improve SEO content and restructuring * add new package for toggle on tutorials * move folder around * improve main page of each prod * small updates and improvements * fix logo above * small improvement in headtitle for portfolio funcs * fix typos from OpenAI's GPT-4 * fix _category_ json * remove generic SEO words * add script that generates SEO for documentation * add missing file * remove sdk warning message * fix links for andrew --------- Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> * Add light blue banner, blue when clicking sidebar + fix link in docusaurus.config.js (#5627) * typo * pro docs tab coloring * sidebar selection blue * redirecting missing * Update crypto introduction.md * titles * another title * Update crypto dd.md * Update defi.md * Update disc.md * Update nft.md * Update onchain.md * Update ov.md * Update introduction.md updates URL * Update introduction.md add HeadTitle * Update ba.md * Update comparison.md * Update dark-pool-shorts.md * Update disc.md * fix docs (#5646) * Update fa.md * Update gov.md * Update ins.md * Update tradinghours.md * Delete website/content/terminal/menus/stocks/options/screener.md * Update Options introduction.md * Update screener head title * Update screener TOC * Update econometrics.md * Update economy head title * Update etf.md * codespell * Fix the redirect for intro to the correct url for docs (#5658) * fix the redirect for intro to the correct url for docs * fix code linting --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * Contributing guidelines (#5615) * intro section * what's expected sections * improve sections * improve sections and move how to add a data point * moving qa under contributor * better intro * moving the sharing section * better expectations * small intro to the contributor guidelines * moving things under the contributor section * there is no pre commits on the platform yet * dependency management * best practices for extensions * typo * collapse options subfolder * codespell * Improve Pro documentation further (#5641) * small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> * Update folders.md * Update integrate-your-own-backend.md * Update index.md * Update fixedincome.md * url * Update forecast.md * Update settings.md (#5665) * Update forex.md * fix front matter (#5667) * Fix conflict markers that got into markdown during previous merges * Fix front matter list formatting * Fix typo * small thing * fix hyperlinks * Update .codespell.ignore * output_type options * Architectural considerations * Update sidebar to hide pro section by default * Minor copy changes * TET pattern * import statements * clarification on preferences * Minor copy changes * Lint markdown and python * fix: open index on collapsible root elements * remove old content * options title * Fix linting errors * Refactor sidebar label to url mapping condition --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Add multi-ticker support to etf_countries (#5670) * add multi-ticker support to etf_countries * remove commented-out lines * normalized percent points * percent -> percentage * Fix Nasdaq Econ Calendar Fetcher (#5668) * fix nasdaq econ cal request * more html tags * add random-user-agent to pyproject * another edge case - 24H -> 00:00 * Feature/v4-unusual-options: Adds unusual options endpoint. (#5677) * add unusual options fro Intrinio * test params * move sorting * Change type * update FMP fetcher to use the V4 endpoint (#5681) * Fix price performance not parsed correctly when there is only 1 ticker (#5678) * Add crypto search standard model and FMP data for it (#5679) * Apply renaming to news data (#5684) * inegration complete * reformatted for black * fix ruff issues * revised integration * changes to versions in pyproject.toml and updated lock files * Rename models * Update tests * Fix typos here and there * Update routers * Apply rename to ultima * Properly mock api key * Mock ultima api key --------- Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> * Feature/v4-market-snapshots: Adds full market snapshots (#5473) * add stocks market snapshots from fmp * add fmp fetcher test * unused imports * add polygon to market_snapshots * update fmp market_snapshots * black * pydantic2 things * updates * change validate_obj to model_validate * polygon cleanup * tests * descriptions * black * data description * minor adjustments, using less local variables, improving readability and removing pandas * better structure * minor adjustments * lint * fix int tests --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Add NBBO Quotes, with historical, to `obb.stocks.quote()` (#5617) * coerce string type, add default=None * add polygon stock quote * limit cleanup * add greater/less than to params * limit param * black * tests * fix tests * test_etf * rename model and function to NBBO * add standard model for nbbo * improve standardization * not redifining builtin max * fix input params * integration test params * removing unused import Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> * revamped code * re-recorded nbbo test * added symbol validator * added alias in field * Stock news -> Company news --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * hotfix/update-quandl-to-nasdaq: Merge Quandl + Nasdaq (#5682) * merge quandl nd nasdaq * dev_install.py * test param name * economy python integration test * Add more input types to data processing commands (#5453) * adding more supported types to data processing commands * ruff * removing unused import * docstrings * data processing types covertion * data description * test filters * ruff * fix package builder tests * ruff * removing print * Add stocks/dps module (#5638) * short volume * pyproject missed * add sec short interest with days to cover * Add FINRA OTC endopoint * some tests * rest of unit tests * Integratin test scripts * dev install * linters caught by pre commit * lines too long * Last test files * maybe it needs a lock file? * thanks pratty * Maybe ill actually listen to pratty next time * sec test date freeze * I cant hit buttons * re record tests * tests 3 * Stockgrid test * regen int test * more testing * lint * moved these fns * dis killing me * one more test * last one * Update integration tests * Fix tests picking up wrong dps route --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename Forex to Currency (#5687) * restore fields as optional (#5686) * Rename Crypto (#5689) * added `crypto.price.historical` * static * fix tests * fix incorrect label * Move model from sec to finra (#5692) * Update toml * fixed deps * add openbb-etf lock file * cleanup * cleanup (#5694) * Rename Fixed Income (#5695) * Rename Fixed Income * Add routers * Rename stocks to equity (#5688) * Rename stocks folder * Rename openbb_stocks package * Rename routers * Reroute equity menu * Update routes based on feedback * StockNews -> EquityNews * StockInfo -> EquityProfile * Rename Equity calendars * Equity peers rename * Rename discovery * Rename fundamental * Rename price command models * Rename shorts * Update charting router * Fix seeking alpha upcoming release date * Fix linting errors * Update tests * Fix tests * Skip econometrics api tests because it's python only * Update integration tests and test data * Historical analyst estimates * Skip cboe options chain test. Unable to record vcr cassette * re-record cboe cassettes * Document CBOE unit test creation caveats --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> * Feature/files-for-igor: Adding a few standard models for Igor (#5699) * add some standard models for Igor * codespell * update descriptions * Add devtools metapackage (#5703) * Add openbb-devtools metapackage * adding devtools to the dev_install script --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> * Rename econometrics commands to be more verbose (#5702) * Expose command to model map (#5706) * Rename ta qa (#5708) * Rename ta folder * Rename ta to technical * Rename qa folder * Rename qa to quantitative * Rename the actual routes in quantitative * Equity cleanup (#5707) * cleanup * static * renaming to equity cc @the-praxs * Proof reading --------- Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Don't enforce imperative for first word of the docstring * Remove ultima from default extensions * Rename `economy` and create `index` extension (#5705) * renamed economy and re-recorded tests * static * market indices * european indices * fred indices * index constituents * tests * correct package name * oops * static * linting * Move COT commands to regulators * Rename economy.list to available_indices * Rename GDP models and clean up * Fix charting tests * Drop _indices from available_indices command * Fix obbject to_dict test --------- Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Rename etf/disc (#5715) * Docs/v4-working-docs: PR to Work on V4 Docs (#5693) * Revert changes related to pydantic2 made into v3 code * Revert fred model changes in v3 * Revert pydantic2 databento model changes in v2 * Update some names and v3 lock file * Clean up openbb/package before the beta release * Platform publishing procedure (#5701) * update instructions * introducing the version script * publish message * fix platform path * reflecting version changes * getting version from installed packages instead * removing toml from dependencies * Changes to get `a7` out (#5697) * changes to get a7 out * etf menu on the pyproject.toml * poetry lock * bump `openbb-etf` to `a5` to match version * updated deps * removing ultima * removing references to a4 cc @the-praxs * Bump index menu version * poetry lock --------- Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> * Update publishing instructions * Bump core dependencies in extensions and providers * Add changes to the publish script following the beta release * Update the versions in static extension map and openbb metapackage --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Igor Radovan… * [Feature] Flatten Revenue By Geography and Business Line (#6624) * flatten rev by geo and business line * test cassettes * fix test? * fix tests..? * inner quotes --------- Co-authored-by: James Maslek <jmaslek11@gmail.com> * [Feature] Add Top Export Destinations By Country From UN Comtrade International Trade Statistics Database (EconDB) (#6644) * add economy.export_destinations * mypy * elif * unused argument --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> * open draft for release 4.3.2 * sync core version * remove file not supposed to be included * [BugFix] Fix Tests & Related Bugs (#6657) * fix tests and related bugs * docstring * add trust_env to ClientSession initializations * pylint * other pylint * update packages * linting * clear merge artifacts * update extension data asset --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Co-authored-by: Elias Rad <146735585+nnsW3@users.noreply.github.com> Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: mmistroni <mmistroni@gmail.com> Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: Luqman <luqazino@gmail.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu> Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Michael Struwig <mnicstruwig@gmail.com> Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com> Co-authored-by: capital0 <72140796+capital0@users.noreply.github.com> Co-authored-by: Ben Van Doren <benvandoren@users.noreply.github.com> Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: Adi Sai <adithya.sairam1@gmail.com> Co-authored-by: Sandip Saha <sandipsmoto@gmail.com> Co-authored-by: Adwait <111136306+AdwaitSalankar@users.noreply.github.com> Co-authored-by: Abhishek Amar <66067391+abhishek-amar@users.noreply.github.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: professssor <62937125+professssor@users.noreply.github.com> Co-authored-by: Farookh Zaheer Siddiqui <129654632+FarukhS52@users.noreply.github.com> Co-authored-by: MAX SHESTOV <57421753+maxxsh@users.noreply.github.com> Co-authored-by: jose-donato <zmcdonato@gmail.com> Co-authored-by: Mohamad Fadil <fadil.parves@gmail.com> Co-authored-by: Ramazan <guvencramazan@outlook.com> Co-authored-by: joshuabuildsthings <joshuabuildsthings@users.noreply.github.com> Co-authored-by: wojda <114031148+polooner@users.noreply.github.com> Co-authored-by: Bim Phomthong <118195204+bimbolimbo@users.noreply.github.com> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> Co-authored-by: tehcoderer <me@tehcoderer.com> Co-authored-by: Ramazan <guvencramazan@yandex.com> Co-authored-by: omahs <73983677+omahs@users.noreply.github.com> Co-authored-by: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com> Co-authored-by: Ayrton Parkinson <ayrton.parkinson1@gmail.com> Co-authored-by: northern-64bit <75195383+northern-64bit@users.noreply.github.com> Co-authored-by: Luqman <luqman.bello@openbb.finance> Co-authored-by: Eric Li <38477812+EricLi-Dev@users.noreply.github.com> Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com> Co-authored-by: Henrique Joaquim <henriquecjoaquim@gmail.com> Co-authored-by: Disorder AA <disorrder@gmail.com> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Jingyi Z <zhao.elton@gmail.com>
2515 lines
84 KiB
Plaintext
Vendored
2515 lines
84 KiB
Plaintext
Vendored
{
|
||
"cells": [
|
||
{
|
||
"attachments": {},
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"# Historical Prices With the OpenBB Platform\n",
|
||
"\n",
|
||
"This notebook demonstrates some of the ways to approach loading historical price data using the OpenBB Platform. The action is in the Equity module; but first, we need to initialize the notebook with the import statements block.\n",
|
||
"\n",
|
||
"## Import Statements"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 1,
|
||
"metadata": {},
|
||
"outputs": [],
|
||
"source": [
|
||
"from datetime import datetime, timedelta\n",
|
||
"\n",
|
||
"import pandas as pd\n",
|
||
"from openbb import obb"
|
||
]
|
||
},
|
||
{
|
||
"attachments": {},
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"## The Equity Module\n",
|
||
"\n",
|
||
"Historical market prices typically come in the form of OHLC+V - open, high, low, close, volume. There may be additional fields returned by a provider, but those are the expected columns. Granularity and amount of historical data will vary by provider and subscription status. Visit their websites to understand what your entitlements are.\n",
|
||
"\n",
|
||
"### openbb.equity.price.historical()\n",
|
||
"\n",
|
||
"- This endpoint has the most number of providers out of any function. At the time of writing, choices are:\n",
|
||
"\n",
|
||
"['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']\n",
|
||
"\n",
|
||
"- Common parameters have been standardized across all souces, `start_date`, `end_date`, `interval`.\n",
|
||
"\n",
|
||
"- The default interval will be `1d`.\n",
|
||
"\n",
|
||
"- The depth of historical data and choices for granularity will vary by provider and subscription status. Refer to the website and documentation of each source understand your specific entitlements.\n",
|
||
"\n",
|
||
"- For demonstration purposes, we will use the `openbb-yfinance` data extension."
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 2,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" <th>capital_gains</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-22</th>\n",
|
||
" <td>441.179993</td>\n",
|
||
" <td>441.179993</td>\n",
|
||
" <td>437.570007</td>\n",
|
||
" <td>438.149994</td>\n",
|
||
" <td>65062900</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume \\\n",
|
||
"date \n",
|
||
"2023-08-22 441.179993 441.179993 437.570007 438.149994 65062900 \n",
|
||
"\n",
|
||
" split_ratio dividend capital_gains \n",
|
||
"date \n",
|
||
"2023-08-22 0.0 0.0 0.0 "
|
||
]
|
||
},
|
||
"execution_count": 2,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"df_daily = obb.equity.price.historical(symbol=\"spy\", provider=\"yfinance\")\n",
|
||
"df_daily.to_df().head(1)"
|
||
]
|
||
},
|
||
{
|
||
"attachments": {},
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"To load the entire history available from a source, pick a starting date well beyond what it might be. For example, `1900-01-01`"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 3,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" <th>capital_gains</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>1993-01-29</th>\n",
|
||
" <td>43.96875</td>\n",
|
||
" <td>43.96875</td>\n",
|
||
" <td>43.75</td>\n",
|
||
" <td>43.9375</td>\n",
|
||
" <td>1003200</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume split_ratio \\\n",
|
||
"date \n",
|
||
"1993-01-29 43.96875 43.96875 43.75 43.9375 1003200 0.0 \n",
|
||
"\n",
|
||
" dividend capital_gains \n",
|
||
"date \n",
|
||
"1993-01-29 0.0 0.0 "
|
||
]
|
||
},
|
||
"execution_count": 3,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"df_daily = obb.equity.price.historical(\n",
|
||
" symbol=\"spy\", start_date=\"1990-01-01\", provider=\"yfinance\"\n",
|
||
").to_df()\n",
|
||
"df_daily.head(1)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"#### Intervals\n",
|
||
"\n",
|
||
"The intervals are entered according to this pattern:\n",
|
||
"\n",
|
||
"- `1m` = One Minute\n",
|
||
"- `1h` = One Hour\n",
|
||
"- `1d` = One Day\n",
|
||
"- `1W` = One Week\n",
|
||
"- `1M` = One Month\n",
|
||
"\n",
|
||
"The date for monthly value is the first or last, depending on the provider. This can be easily resampled from daily data."
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 4,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" <th>capital_gains</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2024-07-01</th>\n",
|
||
" <td>545.630005</td>\n",
|
||
" <td>565.159973</td>\n",
|
||
" <td>537.450012</td>\n",
|
||
" <td>550.809998</td>\n",
|
||
" <td>1038465500</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-01</th>\n",
|
||
" <td>552.570007</td>\n",
|
||
" <td>563.150024</td>\n",
|
||
" <td>510.269989</td>\n",
|
||
" <td>556.570007</td>\n",
|
||
" <td>954486073</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume \\\n",
|
||
"date \n",
|
||
"2024-07-01 545.630005 565.159973 537.450012 550.809998 1038465500 \n",
|
||
"2024-08-01 552.570007 563.150024 510.269989 556.570007 954486073 \n",
|
||
"\n",
|
||
" split_ratio dividend capital_gains \n",
|
||
"date \n",
|
||
"2024-07-01 0.0 0.0 0.0 \n",
|
||
"2024-08-01 0.0 0.0 0.0 "
|
||
]
|
||
},
|
||
"execution_count": 4,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"df_monthly = obb.equity.price.historical(\n",
|
||
" \"spy\", start_date=\"1990-01-01\", interval=\"1M\", provider=\"yfinance\"\n",
|
||
").to_df()\n",
|
||
"df_monthly.tail(2)"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"#### Resample a Time Series\n",
|
||
"\n",
|
||
"`yfinance` returns the monthly data for the first day of each month. Let's resample it to take from the last, using the daily information captured in the previous cells."
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 6,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>1993-01-31</th>\n",
|
||
" <td>43.968750</td>\n",
|
||
" <td>43.968750</td>\n",
|
||
" <td>43.750000</td>\n",
|
||
" <td>43.937500</td>\n",
|
||
" <td>1003200</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1993-02-28</th>\n",
|
||
" <td>43.968750</td>\n",
|
||
" <td>45.125000</td>\n",
|
||
" <td>42.812500</td>\n",
|
||
" <td>44.406250</td>\n",
|
||
" <td>5417600</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1993-03-31</th>\n",
|
||
" <td>44.562500</td>\n",
|
||
" <td>45.843750</td>\n",
|
||
" <td>44.218750</td>\n",
|
||
" <td>45.187500</td>\n",
|
||
" <td>3019200</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1993-04-30</th>\n",
|
||
" <td>45.250000</td>\n",
|
||
" <td>45.250000</td>\n",
|
||
" <td>43.281250</td>\n",
|
||
" <td>44.031250</td>\n",
|
||
" <td>2697200</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1993-05-31</th>\n",
|
||
" <td>44.093750</td>\n",
|
||
" <td>45.656250</td>\n",
|
||
" <td>43.843750</td>\n",
|
||
" <td>45.218750</td>\n",
|
||
" <td>1808000</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-04-30</th>\n",
|
||
" <td>523.830017</td>\n",
|
||
" <td>524.380005</td>\n",
|
||
" <td>493.859985</td>\n",
|
||
" <td>501.980011</td>\n",
|
||
" <td>1592974000</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-05-31</th>\n",
|
||
" <td>501.380005</td>\n",
|
||
" <td>533.070007</td>\n",
|
||
" <td>499.549988</td>\n",
|
||
" <td>527.369995</td>\n",
|
||
" <td>1153264400</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-06-30</th>\n",
|
||
" <td>529.020020</td>\n",
|
||
" <td>550.280029</td>\n",
|
||
" <td>522.599976</td>\n",
|
||
" <td>544.219971</td>\n",
|
||
" <td>888923200</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-07-31</th>\n",
|
||
" <td>545.630005</td>\n",
|
||
" <td>565.159973</td>\n",
|
||
" <td>537.450012</td>\n",
|
||
" <td>550.809998</td>\n",
|
||
" <td>1038465500</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-31</th>\n",
|
||
" <td>552.570007</td>\n",
|
||
" <td>563.150024</td>\n",
|
||
" <td>510.269989</td>\n",
|
||
" <td>556.565002</td>\n",
|
||
" <td>954484078</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>380 rows × 5 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume\n",
|
||
"date \n",
|
||
"1993-01-31 43.968750 43.968750 43.750000 43.937500 1003200\n",
|
||
"1993-02-28 43.968750 45.125000 42.812500 44.406250 5417600\n",
|
||
"1993-03-31 44.562500 45.843750 44.218750 45.187500 3019200\n",
|
||
"1993-04-30 45.250000 45.250000 43.281250 44.031250 2697200\n",
|
||
"1993-05-31 44.093750 45.656250 43.843750 45.218750 1808000\n",
|
||
"... ... ... ... ... ...\n",
|
||
"2024-04-30 523.830017 524.380005 493.859985 501.980011 1592974000\n",
|
||
"2024-05-31 501.380005 533.070007 499.549988 527.369995 1153264400\n",
|
||
"2024-06-30 529.020020 550.280029 522.599976 544.219971 888923200\n",
|
||
"2024-07-31 545.630005 565.159973 537.450012 550.809998 1038465500\n",
|
||
"2024-08-31 552.570007 563.150024 510.269989 556.565002 954484078\n",
|
||
"\n",
|
||
"[380 rows x 5 columns]"
|
||
]
|
||
},
|
||
"execution_count": 6,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"df_daily.index = pd.to_datetime(df_daily.index)\n",
|
||
"(\n",
|
||
" df_daily[[\"open\", \"high\", \"low\", \"close\", \"volume\"]]\n",
|
||
" .resample(\"ME\")\n",
|
||
" .agg(\n",
|
||
" {\"open\": \"first\", \"high\": \"max\", \"low\": \"min\", \"close\": \"last\", \"volume\": \"sum\"}\n",
|
||
" )\n",
|
||
")"
|
||
]
|
||
},
|
||
{
|
||
"attachments": {},
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"The block below packs an object with most intervals."
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 8,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/plain": [
|
||
"dict_keys(['one', 'five', 'fifteen', 'thirty', 'sixty', 'daily', 'weekly', 'monthly'])"
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" <th>capital_gains</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-12</th>\n",
|
||
" <td>534.210022</td>\n",
|
||
" <td>555.02002</td>\n",
|
||
" <td>530.950012</td>\n",
|
||
" <td>554.309998</td>\n",
|
||
" <td>242599600</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>554.72998</td>\n",
|
||
" <td>563.150024</td>\n",
|
||
" <td>553.859985</td>\n",
|
||
" <td>557.031006</td>\n",
|
||
" <td>142159243</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume \\\n",
|
||
"date \n",
|
||
"2024-08-12 534.210022 555.02002 530.950012 554.309998 242599600 \n",
|
||
"2024-08-19 554.72998 563.150024 553.859985 557.031006 142159243 \n",
|
||
"\n",
|
||
" split_ratio dividend capital_gains \n",
|
||
"date \n",
|
||
"2024-08-12 0 0.0 0 \n",
|
||
"2024-08-19 0 0.0 0 "
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
},
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" <th>capital_gains</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16 09:30:00</th>\n",
|
||
" <td>551.419983</td>\n",
|
||
" <td>551.929993</td>\n",
|
||
" <td>551.289978</td>\n",
|
||
" <td>551.349976</td>\n",
|
||
" <td>1881026</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16 09:31:00</th>\n",
|
||
" <td>551.349976</td>\n",
|
||
" <td>551.77002</td>\n",
|
||
" <td>551.26001</td>\n",
|
||
" <td>551.630005</td>\n",
|
||
" <td>230595</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume \\\n",
|
||
"date \n",
|
||
"2024-08-16 09:30:00 551.419983 551.929993 551.289978 551.349976 1881026 \n",
|
||
"2024-08-16 09:31:00 551.349976 551.77002 551.26001 551.630005 230595 \n",
|
||
"\n",
|
||
" split_ratio dividend capital_gains \n",
|
||
"date \n",
|
||
"2024-08-16 09:30:00 0 0 0 \n",
|
||
"2024-08-16 09:31:00 0 0 0 "
|
||
]
|
||
},
|
||
"metadata": {},
|
||
"output_type": "display_data"
|
||
}
|
||
],
|
||
"source": [
|
||
"class HistoricalPrices:\n",
|
||
" def __init__(self, symbol, start_date, end_date, provider, **kwargs) -> None:\n",
|
||
" self.one: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"1m\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
" self.five: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"5m\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
" self.fifteen: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"15m\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
" self.thirty: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"30m\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
" self.sixty: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"60m\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
" self.daily: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"1d\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
" self.weekly: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"1W\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
" self.monthly: pd.DataFrame = (\n",
|
||
" obb.equity.price.historical(\n",
|
||
" symbol=symbol,\n",
|
||
" start_date=start_date,\n",
|
||
" end_date=end_date,\n",
|
||
" interval=\"1M\",\n",
|
||
" provider=provider,\n",
|
||
" **kwargs\n",
|
||
" )\n",
|
||
" .to_df()\n",
|
||
" .convert_dtypes()\n",
|
||
" )\n",
|
||
"\n",
|
||
"\n",
|
||
"def load_historical(\n",
|
||
" symbol: str = \"\", start_date=None, end_date=None, provider=None, **kwargs\n",
|
||
") -> HistoricalPrices:\n",
|
||
"\n",
|
||
" if symbol == \"\":\n",
|
||
" display(\"Please enter a ticker symbol\")\n",
|
||
" if provider is None:\n",
|
||
" provider = \"yfinance\"\n",
|
||
" prices = HistoricalPrices(symbol, start_date, end_date, provider, **kwargs)\n",
|
||
"\n",
|
||
" return prices\n",
|
||
"\n",
|
||
"\n",
|
||
"prices = load_historical(\"spy\")\n",
|
||
"display(prices.__dict__.keys())\n",
|
||
"display(prices.weekly.tail(2))\n",
|
||
"\n",
|
||
"display(prices.one.head(2))"
|
||
]
|
||
},
|
||
{
|
||
"attachments": {},
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"To demonstrate the difference between sources, let's compare values for daily volume from several sources."
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 11,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>AV Volume</th>\n",
|
||
" <th>FMP Volume</th>\n",
|
||
" <th>Intrinio Volume</th>\n",
|
||
" <th>Yahoo Volume</th>\n",
|
||
" <th>Polygon Volume</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-09</th>\n",
|
||
" <td>45619558</td>\n",
|
||
" <td>45619558.0</td>\n",
|
||
" <td>45619558.0</td>\n",
|
||
" <td>45619600.0</td>\n",
|
||
" <td>45425963.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-12</th>\n",
|
||
" <td>42542069</td>\n",
|
||
" <td>42542069.0</td>\n",
|
||
" <td>42542069.0</td>\n",
|
||
" <td>42542100.0</td>\n",
|
||
" <td>42533175.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-13</th>\n",
|
||
" <td>52333073</td>\n",
|
||
" <td>52333073.0</td>\n",
|
||
" <td>52333073.0</td>\n",
|
||
" <td>52333100.0</td>\n",
|
||
" <td>50110167.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-14</th>\n",
|
||
" <td>42446929</td>\n",
|
||
" <td>42446929.0</td>\n",
|
||
" <td>42446929.0</td>\n",
|
||
" <td>42446900.0</td>\n",
|
||
" <td>42362522.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-15</th>\n",
|
||
" <td>60846812</td>\n",
|
||
" <td>60846812.0</td>\n",
|
||
" <td>60846812.0</td>\n",
|
||
" <td>60846800.0</td>\n",
|
||
" <td>60762738.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16</th>\n",
|
||
" <td>44430728</td>\n",
|
||
" <td>44430728.0</td>\n",
|
||
" <td>44430728.0</td>\n",
|
||
" <td>44430700.0</td>\n",
|
||
" <td>44368969.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>39121793</td>\n",
|
||
" <td>39121793.0</td>\n",
|
||
" <td>39121793.0</td>\n",
|
||
" <td>39121800.0</td>\n",
|
||
" <td>38648958.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>33732264</td>\n",
|
||
" <td>33732264.0</td>\n",
|
||
" <td>33732264.0</td>\n",
|
||
" <td>33732300.0</td>\n",
|
||
" <td>33693989.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>41514600</td>\n",
|
||
" <td>38682509.0</td>\n",
|
||
" <td>41514600.0</td>\n",
|
||
" <td>41467000.0</td>\n",
|
||
" <td>41532360.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" AV Volume FMP Volume Intrinio Volume Yahoo Volume \\\n",
|
||
"date \n",
|
||
"2024-08-09 45619558 45619558.0 45619558.0 45619600.0 \n",
|
||
"2024-08-12 42542069 42542069.0 42542069.0 42542100.0 \n",
|
||
"2024-08-13 52333073 52333073.0 52333073.0 52333100.0 \n",
|
||
"2024-08-14 42446929 42446929.0 42446929.0 42446900.0 \n",
|
||
"2024-08-15 60846812 60846812.0 60846812.0 60846800.0 \n",
|
||
"2024-08-16 44430728 44430728.0 44430728.0 44430700.0 \n",
|
||
"2024-08-19 39121793 39121793.0 39121793.0 39121800.0 \n",
|
||
"2024-08-20 33732264 33732264.0 33732264.0 33732300.0 \n",
|
||
"2024-08-21 41514600 38682509.0 41514600.0 41467000.0 \n",
|
||
"\n",
|
||
" Polygon Volume \n",
|
||
"date \n",
|
||
"2024-08-09 45425963.0 \n",
|
||
"2024-08-12 42533175.0 \n",
|
||
"2024-08-13 50110167.0 \n",
|
||
"2024-08-14 42362522.0 \n",
|
||
"2024-08-15 60762738.0 \n",
|
||
"2024-08-16 44368969.0 \n",
|
||
"2024-08-19 38648958.0 \n",
|
||
"2024-08-20 33693989.0 \n",
|
||
"2024-08-21 41532360.0 "
|
||
]
|
||
},
|
||
"execution_count": 11,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"# Collect the data\n",
|
||
"\n",
|
||
"yahoo = obb.equity.price.historical(\"spy\", provider=\"yfinance\").to_df()\n",
|
||
"alphavantage = obb.equity.price.historical(\"spy\", provider=\"alpha_vantage\").to_df()\n",
|
||
"intrinio = obb.equity.price.historical(\"spy\", provider=\"intrinio\").to_df()\n",
|
||
"fmp = obb.equity.price.historical(\"spy\", provider=\"fmp\").to_df()\n",
|
||
"polygon = obb.equity.price.historical(\"spy\", provider=\"polygon\").to_df()\n",
|
||
"\n",
|
||
"# Make a new DataFrame with just the volume columns\n",
|
||
"compare = pd.DataFrame()\n",
|
||
"compare[\"AV Volume\"] = alphavantage[\"volume\"].tail(10)\n",
|
||
"compare[\"FMP Volume\"] = fmp[\"volume\"].tail(10)\n",
|
||
"compare[\"Intrinio Volume\"] = intrinio[\"volume\"].tail(10)\n",
|
||
"compare[\"Yahoo Volume\"] = yahoo[\"volume\"].tail(10)\n",
|
||
"compare[\"Polygon Volume\"] = polygon[\"volume\"].tail(10)\n",
|
||
"\n",
|
||
"compare.dropna(how=\"any\")"
|
||
]
|
||
},
|
||
{
|
||
"attachments": {},
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"## Other Types of Symbols\n",
|
||
"\n",
|
||
"Other types of assets and ticker symbols can be loaded from `obb.equity.price.historical()`, below are some examples but not an exhaustive list.\n",
|
||
"\n",
|
||
"### Share Classes\n",
|
||
"\n",
|
||
"Some sources use `-` as the distinction between a share class, e.g., `BRK-A` and `BRK-B`. Other formats include:\n",
|
||
"\n",
|
||
"- A period: `BRK.A`\n",
|
||
"- A slash: `BRK/A`\n",
|
||
"- No separator, the share class becomes the fourth or fifth letter.\n",
|
||
"\n",
|
||
"```python\n",
|
||
"obb.equity.price.historical(\"brk.b\", provider=\"polygon\")\n",
|
||
"```\n",
|
||
"\n",
|
||
"```python\n",
|
||
"obb.equity.price.historical(\"brk-b\", provider=\"fmp\")\n",
|
||
"```\n",
|
||
"\n",
|
||
"While some providers handle the different formats on their end, others do not. This is something to consider when no results are returned from one source. Some may even use a combination, or accept multiple variations. Sometimes there is no real logic behind the additional characters, `GOOGL` vs. `GOOG`. These are known unknown variables of ticker symbology, what's good for one source may return errors from another. \n",
|
||
"\n",
|
||
"### Regional Identifiers\n",
|
||
"\n",
|
||
"With providers supporting market data from multiple jurisdictions, the most common method for requesting data outside of US-listings is to append a suffix to the ticker symbol (e.g., `RELIANCE.NS` for Indian equities). Formats may be unique to a provider, so it is best to review the source's documentation for an overview of their specific conventions. [This page](https://help.yahoo.com/kb/SLN2310.html) on Yahoo describes how they format symbols, which many others follow to some degree.\n",
|
||
"\n",
|
||
"### Indexes\n",
|
||
"\n",
|
||
"Sources will have their own treatment of these symbols, some examples are:\n",
|
||
"\n",
|
||
"- YahooFinance/FMP/CBOE: ^RUT\n",
|
||
"- Polygon: I:NDX\n",
|
||
"\n",
|
||
"### Currencies\n",
|
||
"\n",
|
||
"FX symbols face the same dilemna as share classes, there are several variations of the same symbol.\n",
|
||
"\n",
|
||
"- YahooFinance: `EURUSD=X`\n",
|
||
"- Polygon: `C:EURUSD`\n",
|
||
"- AlphaVantage/FMP: `EURUSD`\n",
|
||
"\n",
|
||
"**The symbol prefixes are handled internally when `obb.currency.price.historical()` is used to enter a pair with no extra characters.**\n",
|
||
"\n",
|
||
"### Crypto\n",
|
||
"\n",
|
||
"Similar, but different to FX tickers.\n",
|
||
"\n",
|
||
"- YahooFinance: `BTC-USD`\n",
|
||
"- Polygon: `X:BTCUSD`\n",
|
||
"- AlphaVantage/FMP: `BTCUSD`\n",
|
||
"\n",
|
||
"**The symbol prefixes are handled internally when `obb.crypto.price.historical()` is used to enter a pair with no extra characters and placing the fiat currency second.**\n",
|
||
"\n",
|
||
"### Futures\n",
|
||
"\n",
|
||
"Historical prices for active contracts, and the continuation chart, can be fetched via `yfinance`.\n",
|
||
"\n",
|
||
"- Continuous front-month: `CL=F`\n",
|
||
"- December 2023 contract: `CLZ24.NYM`\n",
|
||
"- March 2024 contract: `CLH24.NYM`\n",
|
||
"\n",
|
||
"Individual contracts will require knowing which of the CME venues the future is listed on. `[\"NYM\", \"NYB\", \"CME\", \"CBT\"]`.\n",
|
||
"\n",
|
||
"### Options\n",
|
||
"\n",
|
||
"Individual options contracts are also loadable from `openbb.equity.price.historical()`.\n",
|
||
"\n",
|
||
"- YahooFinance: `SPY241220P00400000`\n",
|
||
"- Polygon: `O:SPY241220P00400000`"
|
||
]
|
||
},
|
||
{
|
||
"attachments": {},
|
||
"cell_type": "markdown",
|
||
"metadata": {},
|
||
"source": [
|
||
"These examples represent only a few methods for fetching historical price data. Explore the contents of each module to find more!"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 13,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-22</th>\n",
|
||
" <td>25.10</td>\n",
|
||
" <td>25.100000</td>\n",
|
||
" <td>25.10</td>\n",
|
||
" <td>25.100000</td>\n",
|
||
" <td>11</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-23</th>\n",
|
||
" <td>25.00</td>\n",
|
||
" <td>25.000000</td>\n",
|
||
" <td>24.50</td>\n",
|
||
" <td>24.500000</td>\n",
|
||
" <td>2</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-24</th>\n",
|
||
" <td>25.00</td>\n",
|
||
" <td>25.200001</td>\n",
|
||
" <td>25.00</td>\n",
|
||
" <td>25.200001</td>\n",
|
||
" <td>2</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-25</th>\n",
|
||
" <td>25.35</td>\n",
|
||
" <td>25.350000</td>\n",
|
||
" <td>24.18</td>\n",
|
||
" <td>24.549999</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-29</th>\n",
|
||
" <td>24.00</td>\n",
|
||
" <td>24.700001</td>\n",
|
||
" <td>22.50</td>\n",
|
||
" <td>23.910000</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16</th>\n",
|
||
" <td>5.95</td>\n",
|
||
" <td>6.100000</td>\n",
|
||
" <td>5.95</td>\n",
|
||
" <td>5.990000</td>\n",
|
||
" <td>4</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>5.92</td>\n",
|
||
" <td>5.920000</td>\n",
|
||
" <td>5.71</td>\n",
|
||
" <td>5.710000</td>\n",
|
||
" <td>40</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>5.73</td>\n",
|
||
" <td>6.240000</td>\n",
|
||
" <td>5.73</td>\n",
|
||
" <td>6.240000</td>\n",
|
||
" <td>42</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>6.28</td>\n",
|
||
" <td>6.660000</td>\n",
|
||
" <td>6.28</td>\n",
|
||
" <td>6.440000</td>\n",
|
||
" <td>276</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-22</th>\n",
|
||
" <td>6.29</td>\n",
|
||
" <td>6.660000</td>\n",
|
||
" <td>6.29</td>\n",
|
||
" <td>6.660000</td>\n",
|
||
" <td>4</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>234 rows × 7 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume split_ratio dividend\n",
|
||
"date \n",
|
||
"2023-08-22 25.10 25.100000 25.10 25.100000 11 0.0 0.0\n",
|
||
"2023-08-23 25.00 25.000000 24.50 24.500000 2 0.0 0.0\n",
|
||
"2023-08-24 25.00 25.200001 25.00 25.200001 2 0.0 0.0\n",
|
||
"2023-08-25 25.35 25.350000 24.18 24.549999 0 0.0 0.0\n",
|
||
"2023-08-29 24.00 24.700001 22.50 23.910000 0 0.0 0.0\n",
|
||
"... ... ... ... ... ... ... ...\n",
|
||
"2024-08-16 5.95 6.100000 5.95 5.990000 4 0.0 0.0\n",
|
||
"2024-08-19 5.92 5.920000 5.71 5.710000 40 0.0 0.0\n",
|
||
"2024-08-20 5.73 6.240000 5.73 6.240000 42 0.0 0.0\n",
|
||
"2024-08-21 6.28 6.660000 6.28 6.440000 276 0.0 0.0\n",
|
||
"2024-08-22 6.29 6.660000 6.29 6.660000 4 0.0 0.0\n",
|
||
"\n",
|
||
"[234 rows x 7 columns]"
|
||
]
|
||
},
|
||
"execution_count": 13,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"obb.equity.price.historical(\"SPY251219P00400000\", provider=\"yfinance\").to_df()"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 16,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>1978-01-03</th>\n",
|
||
" <td>94.74</td>\n",
|
||
" <td>95.15</td>\n",
|
||
" <td>93.49</td>\n",
|
||
" <td>93.82</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1978-01-04</th>\n",
|
||
" <td>93.16</td>\n",
|
||
" <td>94.10</td>\n",
|
||
" <td>92.57</td>\n",
|
||
" <td>93.52</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1978-01-05</th>\n",
|
||
" <td>94.18</td>\n",
|
||
" <td>94.53</td>\n",
|
||
" <td>92.51</td>\n",
|
||
" <td>92.74</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1978-01-06</th>\n",
|
||
" <td>92.06</td>\n",
|
||
" <td>92.66</td>\n",
|
||
" <td>91.05</td>\n",
|
||
" <td>91.62</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>1978-01-09</th>\n",
|
||
" <td>90.82</td>\n",
|
||
" <td>91.48</td>\n",
|
||
" <td>89.97</td>\n",
|
||
" <td>90.64</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-15</th>\n",
|
||
" <td>5501.13</td>\n",
|
||
" <td>5546.23</td>\n",
|
||
" <td>5501.13</td>\n",
|
||
" <td>5543.22</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16</th>\n",
|
||
" <td>5530.50</td>\n",
|
||
" <td>5561.98</td>\n",
|
||
" <td>5525.17</td>\n",
|
||
" <td>5554.25</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>5557.23</td>\n",
|
||
" <td>5608.30</td>\n",
|
||
" <td>5550.74</td>\n",
|
||
" <td>5608.25</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>5602.88</td>\n",
|
||
" <td>5620.51</td>\n",
|
||
" <td>5585.50</td>\n",
|
||
" <td>5597.12</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>5603.09</td>\n",
|
||
" <td>5632.68</td>\n",
|
||
" <td>5591.57</td>\n",
|
||
" <td>5620.85</td>\n",
|
||
" <td>0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>11509 rows × 5 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume\n",
|
||
"date \n",
|
||
"1978-01-03 94.74 95.15 93.49 93.82 0\n",
|
||
"1978-01-04 93.16 94.10 92.57 93.52 0\n",
|
||
"1978-01-05 94.18 94.53 92.51 92.74 0\n",
|
||
"1978-01-06 92.06 92.66 91.05 91.62 0\n",
|
||
"1978-01-09 90.82 91.48 89.97 90.64 0\n",
|
||
"... ... ... ... ... ...\n",
|
||
"2024-08-15 5501.13 5546.23 5501.13 5543.22 0\n",
|
||
"2024-08-16 5530.50 5561.98 5525.17 5554.25 0\n",
|
||
"2024-08-19 5557.23 5608.30 5550.74 5608.25 0\n",
|
||
"2024-08-20 5602.88 5620.51 5585.50 5597.12 0\n",
|
||
"2024-08-21 5603.09 5632.68 5591.57 5620.85 0\n",
|
||
"\n",
|
||
"[11509 rows x 5 columns]"
|
||
]
|
||
},
|
||
"execution_count": 16,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"obb.equity.price.historical(\"SPX\", provider=\"cboe\").to_df()"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 17,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>vwap</th>\n",
|
||
" <th>adj_close</th>\n",
|
||
" <th>unadjusted_volume</th>\n",
|
||
" <th>change</th>\n",
|
||
" <th>change_percent</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-22</th>\n",
|
||
" <td>4415.33008</td>\n",
|
||
" <td>4418.58984</td>\n",
|
||
" <td>4382.77002</td>\n",
|
||
" <td>4387.54980</td>\n",
|
||
" <td>3522760000</td>\n",
|
||
" <td>4396.30</td>\n",
|
||
" <td>4387.54980</td>\n",
|
||
" <td>3.522760e+09</td>\n",
|
||
" <td>-27.78028</td>\n",
|
||
" <td>-0.006292</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-23</th>\n",
|
||
" <td>4396.43994</td>\n",
|
||
" <td>4443.18018</td>\n",
|
||
" <td>4396.43994</td>\n",
|
||
" <td>4436.00977</td>\n",
|
||
" <td>3837270000</td>\n",
|
||
" <td>4425.21</td>\n",
|
||
" <td>4436.00977</td>\n",
|
||
" <td>3.837270e+09</td>\n",
|
||
" <td>39.56983</td>\n",
|
||
" <td>0.009000</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-24</th>\n",
|
||
" <td>4455.16016</td>\n",
|
||
" <td>4458.29980</td>\n",
|
||
" <td>4375.54980</td>\n",
|
||
" <td>4376.31006</td>\n",
|
||
" <td>3723470000</td>\n",
|
||
" <td>4403.39</td>\n",
|
||
" <td>4376.31006</td>\n",
|
||
" <td>3.723470e+09</td>\n",
|
||
" <td>-78.85010</td>\n",
|
||
" <td>-0.017700</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-25</th>\n",
|
||
" <td>4389.37988</td>\n",
|
||
" <td>4418.45996</td>\n",
|
||
" <td>4356.29004</td>\n",
|
||
" <td>4405.70996</td>\n",
|
||
" <td>3296180000</td>\n",
|
||
" <td>4393.49</td>\n",
|
||
" <td>4405.70996</td>\n",
|
||
" <td>3.296180e+09</td>\n",
|
||
" <td>16.33008</td>\n",
|
||
" <td>0.003720</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-28</th>\n",
|
||
" <td>4426.02979</td>\n",
|
||
" <td>4439.56006</td>\n",
|
||
" <td>4414.97998</td>\n",
|
||
" <td>4433.31006</td>\n",
|
||
" <td>2957230000</td>\n",
|
||
" <td>4429.28</td>\n",
|
||
" <td>4433.31006</td>\n",
|
||
" <td>2.957230e+09</td>\n",
|
||
" <td>7.28027</td>\n",
|
||
" <td>0.001645</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16</th>\n",
|
||
" <td>5530.50000</td>\n",
|
||
" <td>5561.97998</td>\n",
|
||
" <td>5525.16992</td>\n",
|
||
" <td>5554.25000</td>\n",
|
||
" <td>3357690000</td>\n",
|
||
" <td>5542.97</td>\n",
|
||
" <td>5554.25000</td>\n",
|
||
" <td>3.357690e+09</td>\n",
|
||
" <td>23.75000</td>\n",
|
||
" <td>0.004294</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>5557.22998</td>\n",
|
||
" <td>5608.29981</td>\n",
|
||
" <td>5550.74023</td>\n",
|
||
" <td>5608.25000</td>\n",
|
||
" <td>3222050000</td>\n",
|
||
" <td>5581.13</td>\n",
|
||
" <td>5608.25000</td>\n",
|
||
" <td>3.222050e+09</td>\n",
|
||
" <td>51.02002</td>\n",
|
||
" <td>0.009181</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>5602.87988</td>\n",
|
||
" <td>5620.50977</td>\n",
|
||
" <td>5585.50000</td>\n",
|
||
" <td>5597.12012</td>\n",
|
||
" <td>2994420000</td>\n",
|
||
" <td>5601.50</td>\n",
|
||
" <td>5597.12012</td>\n",
|
||
" <td>2.994420e+09</td>\n",
|
||
" <td>-5.75976</td>\n",
|
||
" <td>-0.001028</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>5603.08984</td>\n",
|
||
" <td>5632.68018</td>\n",
|
||
" <td>5591.56982</td>\n",
|
||
" <td>5620.85010</td>\n",
|
||
" <td>1982137065</td>\n",
|
||
" <td>5612.05</td>\n",
|
||
" <td>5620.85010</td>\n",
|
||
" <td>1.982137e+09</td>\n",
|
||
" <td>17.76026</td>\n",
|
||
" <td>0.003170</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-22</th>\n",
|
||
" <td>5637.77000</td>\n",
|
||
" <td>5643.22000</td>\n",
|
||
" <td>5563.54000</td>\n",
|
||
" <td>5577.27000</td>\n",
|
||
" <td>1218069912</td>\n",
|
||
" <td>5594.68</td>\n",
|
||
" <td>5577.27000</td>\n",
|
||
" <td>1.218070e+09</td>\n",
|
||
" <td>-60.50000</td>\n",
|
||
" <td>-0.010731</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>253 rows × 10 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume \\\n",
|
||
"date \n",
|
||
"2023-08-22 4415.33008 4418.58984 4382.77002 4387.54980 3522760000 \n",
|
||
"2023-08-23 4396.43994 4443.18018 4396.43994 4436.00977 3837270000 \n",
|
||
"2023-08-24 4455.16016 4458.29980 4375.54980 4376.31006 3723470000 \n",
|
||
"2023-08-25 4389.37988 4418.45996 4356.29004 4405.70996 3296180000 \n",
|
||
"2023-08-28 4426.02979 4439.56006 4414.97998 4433.31006 2957230000 \n",
|
||
"... ... ... ... ... ... \n",
|
||
"2024-08-16 5530.50000 5561.97998 5525.16992 5554.25000 3357690000 \n",
|
||
"2024-08-19 5557.22998 5608.29981 5550.74023 5608.25000 3222050000 \n",
|
||
"2024-08-20 5602.87988 5620.50977 5585.50000 5597.12012 2994420000 \n",
|
||
"2024-08-21 5603.08984 5632.68018 5591.56982 5620.85010 1982137065 \n",
|
||
"2024-08-22 5637.77000 5643.22000 5563.54000 5577.27000 1218069912 \n",
|
||
"\n",
|
||
" vwap adj_close unadjusted_volume change change_percent \n",
|
||
"date \n",
|
||
"2023-08-22 4396.30 4387.54980 3.522760e+09 -27.78028 -0.006292 \n",
|
||
"2023-08-23 4425.21 4436.00977 3.837270e+09 39.56983 0.009000 \n",
|
||
"2023-08-24 4403.39 4376.31006 3.723470e+09 -78.85010 -0.017700 \n",
|
||
"2023-08-25 4393.49 4405.70996 3.296180e+09 16.33008 0.003720 \n",
|
||
"2023-08-28 4429.28 4433.31006 2.957230e+09 7.28027 0.001645 \n",
|
||
"... ... ... ... ... ... \n",
|
||
"2024-08-16 5542.97 5554.25000 3.357690e+09 23.75000 0.004294 \n",
|
||
"2024-08-19 5581.13 5608.25000 3.222050e+09 51.02002 0.009181 \n",
|
||
"2024-08-20 5601.50 5597.12012 2.994420e+09 -5.75976 -0.001028 \n",
|
||
"2024-08-21 5612.05 5620.85010 1.982137e+09 17.76026 0.003170 \n",
|
||
"2024-08-22 5594.68 5577.27000 1.218070e+09 -60.50000 -0.010731 \n",
|
||
"\n",
|
||
"[253 rows x 10 columns]"
|
||
]
|
||
},
|
||
"execution_count": 17,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"obb.equity.price.historical(\"^SPX\", provider=\"fmp\").to_df()"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 19,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-22</th>\n",
|
||
" <td>71.419998</td>\n",
|
||
" <td>71.949997</td>\n",
|
||
" <td>71.029999</td>\n",
|
||
" <td>71.160004</td>\n",
|
||
" <td>5342</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-23</th>\n",
|
||
" <td>71.120003</td>\n",
|
||
" <td>71.320000</td>\n",
|
||
" <td>69.709999</td>\n",
|
||
" <td>70.730003</td>\n",
|
||
" <td>5139</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-24</th>\n",
|
||
" <td>70.459999</td>\n",
|
||
" <td>70.860001</td>\n",
|
||
" <td>69.870003</td>\n",
|
||
" <td>70.190002</td>\n",
|
||
" <td>7594</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-25</th>\n",
|
||
" <td>70.050003</td>\n",
|
||
" <td>70.889999</td>\n",
|
||
" <td>69.470001</td>\n",
|
||
" <td>70.680000</td>\n",
|
||
" <td>9328</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-28</th>\n",
|
||
" <td>70.690002</td>\n",
|
||
" <td>71.190002</td>\n",
|
||
" <td>70.239998</td>\n",
|
||
" <td>70.480003</td>\n",
|
||
" <td>6234</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16</th>\n",
|
||
" <td>70.940002</td>\n",
|
||
" <td>70.989998</td>\n",
|
||
" <td>69.440002</td>\n",
|
||
" <td>70.019997</td>\n",
|
||
" <td>38165</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>70.099998</td>\n",
|
||
" <td>70.400002</td>\n",
|
||
" <td>68.870003</td>\n",
|
||
" <td>69.029999</td>\n",
|
||
" <td>29067</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>69.150002</td>\n",
|
||
" <td>69.250000</td>\n",
|
||
" <td>68.309998</td>\n",
|
||
" <td>68.389999</td>\n",
|
||
" <td>29827</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>68.389999</td>\n",
|
||
" <td>68.959999</td>\n",
|
||
" <td>67.370003</td>\n",
|
||
" <td>67.629997</td>\n",
|
||
" <td>29827</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-22</th>\n",
|
||
" <td>67.730003</td>\n",
|
||
" <td>68.650002</td>\n",
|
||
" <td>67.430000</td>\n",
|
||
" <td>68.220001</td>\n",
|
||
" <td>33722</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>254 rows × 7 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume split_ratio \\\n",
|
||
"date \n",
|
||
"2023-08-22 71.419998 71.949997 71.029999 71.160004 5342 0.0 \n",
|
||
"2023-08-23 71.120003 71.320000 69.709999 70.730003 5139 0.0 \n",
|
||
"2023-08-24 70.459999 70.860001 69.870003 70.190002 7594 0.0 \n",
|
||
"2023-08-25 70.050003 70.889999 69.470001 70.680000 9328 0.0 \n",
|
||
"2023-08-28 70.690002 71.190002 70.239998 70.480003 6234 0.0 \n",
|
||
"... ... ... ... ... ... ... \n",
|
||
"2024-08-16 70.940002 70.989998 69.440002 70.019997 38165 0.0 \n",
|
||
"2024-08-19 70.099998 70.400002 68.870003 69.029999 29067 0.0 \n",
|
||
"2024-08-20 69.150002 69.250000 68.309998 68.389999 29827 0.0 \n",
|
||
"2024-08-21 68.389999 68.959999 67.370003 67.629997 29827 0.0 \n",
|
||
"2024-08-22 67.730003 68.650002 67.430000 68.220001 33722 0.0 \n",
|
||
"\n",
|
||
" dividend \n",
|
||
"date \n",
|
||
"2023-08-22 0.0 \n",
|
||
"2023-08-23 0.0 \n",
|
||
"2023-08-24 0.0 \n",
|
||
"2023-08-25 0.0 \n",
|
||
"2023-08-28 0.0 \n",
|
||
"... ... \n",
|
||
"2024-08-16 0.0 \n",
|
||
"2024-08-19 0.0 \n",
|
||
"2024-08-20 0.0 \n",
|
||
"2024-08-21 0.0 \n",
|
||
"2024-08-22 0.0 \n",
|
||
"\n",
|
||
"[254 rows x 7 columns]"
|
||
]
|
||
},
|
||
"execution_count": 19,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"obb.equity.price.historical(\"CLZ25.NYM\", provider=\"yfinance\").to_df()"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 20,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>vwap</th>\n",
|
||
" <th>adj_close</th>\n",
|
||
" <th>unadjusted_volume</th>\n",
|
||
" <th>change</th>\n",
|
||
" <th>change_percent</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-22</th>\n",
|
||
" <td>80.80</td>\n",
|
||
" <td>80.99</td>\n",
|
||
" <td>80.10</td>\n",
|
||
" <td>80.35</td>\n",
|
||
" <td>287489</td>\n",
|
||
" <td>80.48</td>\n",
|
||
" <td>80.35</td>\n",
|
||
" <td>287489.0</td>\n",
|
||
" <td>-0.45</td>\n",
|
||
" <td>-0.005569</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-23</th>\n",
|
||
" <td>79.64</td>\n",
|
||
" <td>79.91</td>\n",
|
||
" <td>77.62</td>\n",
|
||
" <td>78.89</td>\n",
|
||
" <td>378146</td>\n",
|
||
" <td>78.81</td>\n",
|
||
" <td>78.89</td>\n",
|
||
" <td>378146.0</td>\n",
|
||
" <td>-0.75</td>\n",
|
||
" <td>-0.009417</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-24</th>\n",
|
||
" <td>78.57</td>\n",
|
||
" <td>79.28</td>\n",
|
||
" <td>77.59</td>\n",
|
||
" <td>79.05</td>\n",
|
||
" <td>349230</td>\n",
|
||
" <td>78.64</td>\n",
|
||
" <td>79.05</td>\n",
|
||
" <td>349230.0</td>\n",
|
||
" <td>0.48</td>\n",
|
||
" <td>0.006109</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-25</th>\n",
|
||
" <td>78.88</td>\n",
|
||
" <td>80.45</td>\n",
|
||
" <td>78.14</td>\n",
|
||
" <td>79.83</td>\n",
|
||
" <td>411409</td>\n",
|
||
" <td>79.47</td>\n",
|
||
" <td>79.83</td>\n",
|
||
" <td>411409.0</td>\n",
|
||
" <td>0.95</td>\n",
|
||
" <td>0.012000</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-28</th>\n",
|
||
" <td>80.15</td>\n",
|
||
" <td>80.87</td>\n",
|
||
" <td>79.61</td>\n",
|
||
" <td>80.10</td>\n",
|
||
" <td>246584</td>\n",
|
||
" <td>80.19</td>\n",
|
||
" <td>80.10</td>\n",
|
||
" <td>246584.0</td>\n",
|
||
" <td>-0.05</td>\n",
|
||
" <td>-0.000624</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-18</th>\n",
|
||
" <td>76.58</td>\n",
|
||
" <td>76.71</td>\n",
|
||
" <td>76.48</td>\n",
|
||
" <td>76.71</td>\n",
|
||
" <td>175</td>\n",
|
||
" <td>76.62</td>\n",
|
||
" <td>76.71</td>\n",
|
||
" <td>175.0</td>\n",
|
||
" <td>0.13</td>\n",
|
||
" <td>0.001698</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>76.58</td>\n",
|
||
" <td>76.87</td>\n",
|
||
" <td>74.17</td>\n",
|
||
" <td>74.37</td>\n",
|
||
" <td>118172</td>\n",
|
||
" <td>75.50</td>\n",
|
||
" <td>74.37</td>\n",
|
||
" <td>118172.0</td>\n",
|
||
" <td>-2.21</td>\n",
|
||
" <td>-0.028900</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>74.34</td>\n",
|
||
" <td>75.03</td>\n",
|
||
" <td>73.50</td>\n",
|
||
" <td>74.04</td>\n",
|
||
" <td>118172</td>\n",
|
||
" <td>74.23</td>\n",
|
||
" <td>74.04</td>\n",
|
||
" <td>118172.0</td>\n",
|
||
" <td>-0.30</td>\n",
|
||
" <td>-0.004036</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>73.12</td>\n",
|
||
" <td>74.16</td>\n",
|
||
" <td>71.46</td>\n",
|
||
" <td>71.93</td>\n",
|
||
" <td>361850</td>\n",
|
||
" <td>72.67</td>\n",
|
||
" <td>71.93</td>\n",
|
||
" <td>361850.0</td>\n",
|
||
" <td>-1.19</td>\n",
|
||
" <td>-0.016300</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-22</th>\n",
|
||
" <td>71.93</td>\n",
|
||
" <td>73.52</td>\n",
|
||
" <td>71.58</td>\n",
|
||
" <td>73.00</td>\n",
|
||
" <td>28663</td>\n",
|
||
" <td>72.70</td>\n",
|
||
" <td>73.00</td>\n",
|
||
" <td>28663.0</td>\n",
|
||
" <td>1.07</td>\n",
|
||
" <td>0.014876</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>266 rows × 10 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume vwap adj_close \\\n",
|
||
"date \n",
|
||
"2023-08-22 80.80 80.99 80.10 80.35 287489 80.48 80.35 \n",
|
||
"2023-08-23 79.64 79.91 77.62 78.89 378146 78.81 78.89 \n",
|
||
"2023-08-24 78.57 79.28 77.59 79.05 349230 78.64 79.05 \n",
|
||
"2023-08-25 78.88 80.45 78.14 79.83 411409 79.47 79.83 \n",
|
||
"2023-08-28 80.15 80.87 79.61 80.10 246584 80.19 80.10 \n",
|
||
"... ... ... ... ... ... ... ... \n",
|
||
"2024-08-18 76.58 76.71 76.48 76.71 175 76.62 76.71 \n",
|
||
"2024-08-19 76.58 76.87 74.17 74.37 118172 75.50 74.37 \n",
|
||
"2024-08-20 74.34 75.03 73.50 74.04 118172 74.23 74.04 \n",
|
||
"2024-08-21 73.12 74.16 71.46 71.93 361850 72.67 71.93 \n",
|
||
"2024-08-22 71.93 73.52 71.58 73.00 28663 72.70 73.00 \n",
|
||
"\n",
|
||
" unadjusted_volume change change_percent \n",
|
||
"date \n",
|
||
"2023-08-22 287489.0 -0.45 -0.005569 \n",
|
||
"2023-08-23 378146.0 -0.75 -0.009417 \n",
|
||
"2023-08-24 349230.0 0.48 0.006109 \n",
|
||
"2023-08-25 411409.0 0.95 0.012000 \n",
|
||
"2023-08-28 246584.0 -0.05 -0.000624 \n",
|
||
"... ... ... ... \n",
|
||
"2024-08-18 175.0 0.13 0.001698 \n",
|
||
"2024-08-19 118172.0 -2.21 -0.028900 \n",
|
||
"2024-08-20 118172.0 -0.30 -0.004036 \n",
|
||
"2024-08-21 361850.0 -1.19 -0.016300 \n",
|
||
"2024-08-22 28663.0 1.07 0.014876 \n",
|
||
"\n",
|
||
"[266 rows x 10 columns]"
|
||
]
|
||
},
|
||
"execution_count": 20,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"obb.equity.price.historical(\"CL=F\", provider=\"fmp\").to_df()"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 21,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" <th>split_ratio</th>\n",
|
||
" <th>dividend</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-22</th>\n",
|
||
" <td>146.238007</td>\n",
|
||
" <td>146.389999</td>\n",
|
||
" <td>145.501999</td>\n",
|
||
" <td>146.238007</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-23</th>\n",
|
||
" <td>145.763000</td>\n",
|
||
" <td>145.813004</td>\n",
|
||
" <td>144.580002</td>\n",
|
||
" <td>145.763000</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-24</th>\n",
|
||
" <td>144.673004</td>\n",
|
||
" <td>145.947006</td>\n",
|
||
" <td>144.621002</td>\n",
|
||
" <td>144.673004</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-25</th>\n",
|
||
" <td>146.067001</td>\n",
|
||
" <td>146.604996</td>\n",
|
||
" <td>145.733994</td>\n",
|
||
" <td>146.067001</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-28</th>\n",
|
||
" <td>146.531006</td>\n",
|
||
" <td>146.716003</td>\n",
|
||
" <td>146.278000</td>\n",
|
||
" <td>146.531006</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16</th>\n",
|
||
" <td>149.222000</td>\n",
|
||
" <td>149.229996</td>\n",
|
||
" <td>147.639008</td>\n",
|
||
" <td>149.222000</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>147.955994</td>\n",
|
||
" <td>147.959000</td>\n",
|
||
" <td>145.220993</td>\n",
|
||
" <td>147.955994</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>146.699005</td>\n",
|
||
" <td>147.319000</td>\n",
|
||
" <td>145.533997</td>\n",
|
||
" <td>146.699005</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>145.347000</td>\n",
|
||
" <td>146.339005</td>\n",
|
||
" <td>144.981003</td>\n",
|
||
" <td>145.347000</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-22</th>\n",
|
||
" <td>145.117996</td>\n",
|
||
" <td>146.524994</td>\n",
|
||
" <td>144.839996</td>\n",
|
||
" <td>146.292999</td>\n",
|
||
" <td>0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>262 rows × 7 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume \\\n",
|
||
"date \n",
|
||
"2023-08-22 146.238007 146.389999 145.501999 146.238007 0 \n",
|
||
"2023-08-23 145.763000 145.813004 144.580002 145.763000 0 \n",
|
||
"2023-08-24 144.673004 145.947006 144.621002 144.673004 0 \n",
|
||
"2023-08-25 146.067001 146.604996 145.733994 146.067001 0 \n",
|
||
"2023-08-28 146.531006 146.716003 146.278000 146.531006 0 \n",
|
||
"... ... ... ... ... ... \n",
|
||
"2024-08-16 149.222000 149.229996 147.639008 149.222000 0 \n",
|
||
"2024-08-19 147.955994 147.959000 145.220993 147.955994 0 \n",
|
||
"2024-08-20 146.699005 147.319000 145.533997 146.699005 0 \n",
|
||
"2024-08-21 145.347000 146.339005 144.981003 145.347000 0 \n",
|
||
"2024-08-22 145.117996 146.524994 144.839996 146.292999 0 \n",
|
||
"\n",
|
||
" split_ratio dividend \n",
|
||
"date \n",
|
||
"2023-08-22 0.0 0.0 \n",
|
||
"2023-08-23 0.0 0.0 \n",
|
||
"2023-08-24 0.0 0.0 \n",
|
||
"2023-08-25 0.0 0.0 \n",
|
||
"2023-08-28 0.0 0.0 \n",
|
||
"... ... ... \n",
|
||
"2024-08-16 0.0 0.0 \n",
|
||
"2024-08-19 0.0 0.0 \n",
|
||
"2024-08-20 0.0 0.0 \n",
|
||
"2024-08-21 0.0 0.0 \n",
|
||
"2024-08-22 0.0 0.0 \n",
|
||
"\n",
|
||
"[262 rows x 7 columns]"
|
||
]
|
||
},
|
||
"execution_count": 21,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"obb.equity.price.historical(\"usdjpy=x\", provider=\"yfinance\").to_df()"
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"execution_count": 22,
|
||
"metadata": {},
|
||
"outputs": [
|
||
{
|
||
"data": {
|
||
"text/html": [
|
||
"<div>\n",
|
||
"<style scoped>\n",
|
||
" .dataframe tbody tr th:only-of-type {\n",
|
||
" vertical-align: middle;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe tbody tr th {\n",
|
||
" vertical-align: top;\n",
|
||
" }\n",
|
||
"\n",
|
||
" .dataframe thead th {\n",
|
||
" text-align: right;\n",
|
||
" }\n",
|
||
"</style>\n",
|
||
"<table border=\"1\" class=\"dataframe\">\n",
|
||
" <thead>\n",
|
||
" <tr style=\"text-align: right;\">\n",
|
||
" <th></th>\n",
|
||
" <th>open</th>\n",
|
||
" <th>high</th>\n",
|
||
" <th>low</th>\n",
|
||
" <th>close</th>\n",
|
||
" <th>volume</th>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>date</th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" <th></th>\n",
|
||
" </tr>\n",
|
||
" </thead>\n",
|
||
" <tbody>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-22</th>\n",
|
||
" <td>146.238007</td>\n",
|
||
" <td>146.389999</td>\n",
|
||
" <td>145.501999</td>\n",
|
||
" <td>146.238007</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-23</th>\n",
|
||
" <td>145.763000</td>\n",
|
||
" <td>145.813004</td>\n",
|
||
" <td>144.580002</td>\n",
|
||
" <td>145.763000</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-24</th>\n",
|
||
" <td>144.673004</td>\n",
|
||
" <td>145.947006</td>\n",
|
||
" <td>144.621002</td>\n",
|
||
" <td>144.673004</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-25</th>\n",
|
||
" <td>146.067001</td>\n",
|
||
" <td>146.604996</td>\n",
|
||
" <td>145.733994</td>\n",
|
||
" <td>146.067001</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2023-08-28</th>\n",
|
||
" <td>146.531006</td>\n",
|
||
" <td>146.716003</td>\n",
|
||
" <td>146.278000</td>\n",
|
||
" <td>146.531006</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>...</th>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" <td>...</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-16</th>\n",
|
||
" <td>149.222000</td>\n",
|
||
" <td>149.229996</td>\n",
|
||
" <td>147.639008</td>\n",
|
||
" <td>149.222000</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-19</th>\n",
|
||
" <td>147.955994</td>\n",
|
||
" <td>147.959000</td>\n",
|
||
" <td>145.220993</td>\n",
|
||
" <td>147.955994</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-20</th>\n",
|
||
" <td>146.699005</td>\n",
|
||
" <td>147.319000</td>\n",
|
||
" <td>145.533997</td>\n",
|
||
" <td>146.699005</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-21</th>\n",
|
||
" <td>145.347000</td>\n",
|
||
" <td>146.339005</td>\n",
|
||
" <td>144.981003</td>\n",
|
||
" <td>145.347000</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" <tr>\n",
|
||
" <th>2024-08-22</th>\n",
|
||
" <td>145.117996</td>\n",
|
||
" <td>146.524994</td>\n",
|
||
" <td>144.839996</td>\n",
|
||
" <td>146.287003</td>\n",
|
||
" <td>0.0</td>\n",
|
||
" </tr>\n",
|
||
" </tbody>\n",
|
||
"</table>\n",
|
||
"<p>262 rows × 5 columns</p>\n",
|
||
"</div>"
|
||
],
|
||
"text/plain": [
|
||
" open high low close volume\n",
|
||
"date \n",
|
||
"2023-08-22 146.238007 146.389999 145.501999 146.238007 0.0\n",
|
||
"2023-08-23 145.763000 145.813004 144.580002 145.763000 0.0\n",
|
||
"2023-08-24 144.673004 145.947006 144.621002 144.673004 0.0\n",
|
||
"2023-08-25 146.067001 146.604996 145.733994 146.067001 0.0\n",
|
||
"2023-08-28 146.531006 146.716003 146.278000 146.531006 0.0\n",
|
||
"... ... ... ... ... ...\n",
|
||
"2024-08-16 149.222000 149.229996 147.639008 149.222000 0.0\n",
|
||
"2024-08-19 147.955994 147.959000 145.220993 147.955994 0.0\n",
|
||
"2024-08-20 146.699005 147.319000 145.533997 146.699005 0.0\n",
|
||
"2024-08-21 145.347000 146.339005 144.981003 145.347000 0.0\n",
|
||
"2024-08-22 145.117996 146.524994 144.839996 146.287003 0.0\n",
|
||
"\n",
|
||
"[262 rows x 5 columns]"
|
||
]
|
||
},
|
||
"execution_count": 22,
|
||
"metadata": {},
|
||
"output_type": "execute_result"
|
||
}
|
||
],
|
||
"source": [
|
||
"obb.currency.price.historical(\"usdjpy\", provider=\"yfinance\").to_df()"
|
||
]
|
||
}
|
||
],
|
||
"metadata": {
|
||
"kernelspec": {
|
||
"display_name": "obb",
|
||
"language": "python",
|
||
"name": "python3"
|
||
},
|
||
"language_info": {
|
||
"codemirror_mode": {
|
||
"name": "ipython",
|
||
"version": 3
|
||
},
|
||
"file_extension": ".py",
|
||
"mimetype": "text/x-python",
|
||
"name": "python",
|
||
"nbconvert_exporter": "python",
|
||
"pygments_lexer": "ipython3",
|
||
"version": "3.12.4"
|
||
},
|
||
"orig_nbformat": 4
|
||
},
|
||
"nbformat": 4,
|
||
"nbformat_minor": 2
|
||
}
|