Files
OpenBB/openbb_terminal/reports
Jeroen Bouma 0ee2ebcf1e Refractor stocks/fa by incorporating stocks/dd and making the menu less reliant on Yahoo Finance (#4055)
* I missed some sheet_name ones :)

* Move quote to main menu and combine yahoo finance commands

* Update stocks for quote

* First update to move yfinance away from main functionality

* Small updates

* Update tests to reflect changes

* Fix some little things

* Update docs a little too

* Remove the Due Diligence menu

* Update tests for new change

* Update fa and stocks with new text and move some stuff around

* Bye bye dd

* Pls work

* work..

* work..

* work..

* Work..|

* Add tests back in

* Remove tests

* Fix fix fix

* Remove tests to fix conflicts

* Improve the `stocks/search` command (#4084)

* Improve search command

* Make it more intuitive

* Fix tests

* Update the docs

* Ok done

* Ok done 2

* Ok done 3

* Git update tests that failed

* Update commands with --sheet-name that didn't work (#4088)

* Update commands with --sheet-name that didn't work

* Fix test

* oops

* Adds auto completion to `news` (#4089)

* Fix plot look when using eval and add query to choices (#3881)

* convert index to datetime and update choices

* uncomment economy integration test

* fix treasury concat bug

* fix datasets concat on duplciates

* Lock ruff version so that new lints dont break our CI (#3905)

* Lock ruff version so that new lints dont break our CI

* Bumped pre-commit ruff version

* returning always a dataframe

* Revert "returning always a dataframe"

This reverts commit d5dbf3132f.

* quick fix to auto complete args

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Hotfix/Windows-CLI (#4087)

* init

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* Update windows10_build.yml

* oops

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Adds end date to `forex/load` (#4077)

* Fix plot look when using eval and add query to choices (#3881)

* convert index to datetime and update choices

* uncomment economy integration test

* fix treasury concat bug

* fix datasets concat on duplciates

* Lock ruff version so that new lints dont break our CI (#3905)

* Lock ruff version so that new lints dont break our CI

* Bumped pre-commit ruff version

* returning always a dataframe

* Revert "returning always a dataframe"

This reverts commit d5dbf3132f.

* adding end date to the forex load

* added some tests

* added example

* always show msg

* rewriting test

* updating tests

* updating tests

* Redo load tests

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>

* Update tests to reflect changes

* work..

* Remove tests

* Fix fix fix

* Remove tests

* Update the whole test folder

* Small updates

* Revert change

* Update eodhd to reflect it requires a paid plan and update tests

* Fix all the tests

* Update tests

* Update integration tests

* Removing tests so no whining happens

* ADD ALL THE TESTS

* Fix linting

* gitignore.  thanks jer

* Add back dd and redirect to fa

* Update to just display a message

* Update OpenBB SDK commands

* Fixing issues with exporting

* Fix ruff messing up

* Fix tests

* Fix the tests by disabling isort to run on tests folder

---------

Co-authored-by: Jeroen Bouma <jeroenbouma@Jeroens-MacBook-Pro.local>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
Co-authored-by: teh_coderer <me@tehcoderer.com>
2023-02-06 23:24:15 +01:00
..
2023-02-01 12:33:15 +00:00

REPORTS

This menu has a different concept from remaining menus. It has 2 main goals:

  • Generate a personalised report.
  • Allow the user to write notes on that notebook (report), as if it was his personal investment diary.

How to create your own personal report

  1. Copy one of the existing notebook reports as a template, e.g. dark_pool.ipynb.

  2. Rename that notebook with a name that reflects what you want this notebook to contain, even including your name.

  3. One of the notebook cells will have a parameters tag, that's where the papermill will parametrize the notebook. Thus, your variables should be declared there.

  4. Remove the function calls that you don't care about to build your own report.

  5. When building your template notebook, there are 2 type of possible things you can do:

    • Create a markdown cell, where you can add a title or a description. E.g.
    ## Analyst Targets
    
    • Create a code cell, where you should both: import a module, and call a function to display a chart or print data. E.g.
    from openbb_terminal.stocks.due_diligence import finviz_view
    
    finviz_view.analyst(ticker=ticker, export='')
    

Note: In order to find the name of the function you want, you should either crawl through the codebase (and ask help in discord) or look into our readthedocs (#TODO).

How to run the report

  1. In config_terminal you may need to change your PAPERMILL_NOTEBOOK_REPORT_PORT from 8888. If the notebook generation fails, it is likely that the port selected is not the correct one.

  2. Start the terminal with python terminal.py

  3. Select reports context, and choose from the options selected - which are derived from the .ipynb jupyter notebook files on the reports folder.

  4. This should prompt you with a filled notebook with name: <date time>_<report name>_<args>.ipynb. E.g. 20210725_193517_dark_pool_AMC.ipynb

  5. Due to the last cell of the notebook, the report is saved by default as .html. E.g. 20210725_193517_dark_pool_AMC.html

    folder = "notebooks/reports/"
    extension = ".ipynb"
    !jupyter nbconvert {report_name} --to html --no-input
    
  6. You can now write your own personal notes on the notebook. By doing:

    • Click on the notebook cell that you are interested in writing your notes
    • On the toolbar click on "+" to add a new cell
    • On the toolbar click on "Cell" -> "Cell Type" -> "Markdown"
    • You're now ready to write your own notes
  7. Once you're happy with your report, you can either:

    • Re-run the last cell, potentially changing output from .html:
    • Or, on the toolbar click on "File" -> "Download as" -> Select your preferred option (e.g. HTML)