An Interest In:
Web News this Week
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
FOSS In Python: Using The OpenBB Terminal To Automate Processes & Research Tasks In Finance
Support the project: GitHub Twitter Discord Documentation
OpenBB Terminal Routines With Simple Script Technology
In this one minute video, OpenBB Founder Didier Lopes, demonstrates an advanced routine. Continue reading to explore this unique technology and learn how to improve efficiency through workflow.
Routines are executed from the main menu using the command, exe. Help dialogue will be displayed for any function by attaching '-h' to the command string.
2022 Mar 27, 16:36 () / $ exe -husage: exe [-p PATH] [-i ROUTINE_ARGS] [-h]Execute automated routine script.optional arguments: -p PATH, --path PATH The path or .gst file to run. (default: ) -i ROUTINE_ARGS, --input ROUTINE_ARGS Select multiple inputs to be replaced in the routine and separated by commas. E.g. GME,AMC,BTC-USD (default: None) -h, --help show this help message (default: False)
The script files are located in a folder labeled routines, and have a filename extension of .GST. There is also a folder named scripts containing .GST files that test the functions of the terminal. It is recommended to store user-generated files in the routines folder.
Take a closer look at the contents of the file: example_with_inputs_saved.gst
Notice that the code within the script is merely a terminal command on each line where $ARGV is a variable for the desired ticker(s). The routines have the flexibility to be a specific or variable value for any number of tickers.
If you can operate the Terminal, you can build scripts!
The OpenBB Terminal can be launched to play a routine immediately. It's easy to make changes to the routine with any text editor. I have made modifications to example_with_inputs.gst to look like this:
stocksload $ARGV[0]tafib../caadd $ARGV[1],$ARGV[2],$ARGV[3],$ARGV[4]historical -n -s 2009-03-26hcorr
It can be executed in this manner:
python terminal.py routines/example_with_inputs.gst --input VT,SPY,QQQ,BND,GSG
This generates an output from the terminal that looks like this:
2022 Mar 27, 18:37 () /stocks/ $ load VTLoading Daily VT stock with starting period 2019-03-25 for analysis.Datetime: 2022 Mar 27 18:37Timezone: America/New_YorkCurrency: USDMarket: CLOSED2022 Mar 27, 18:37 () /stocks/ $ ta2022 Mar 27, 18:37 () /stocks/ta/ $ fibFibonacci retracement levels Fib Level Price 0.0% 108.14 23.5% 95.06 38.2% 86.88 50.0% 80.31 61.8% 73.74 65.0% 71.96 100.0% 52.48 2022 Mar 27, 18:37 () /stocks/ $ ca2022 Mar 27, 18:37 () /stocks/ca/ $ add BND,SPY,QQQ,GSG[Custom] Similar Companies: SPY, QQQ, BND, GSG, VT 2022 Mar 27, 18:37 () /stocks/ca/ $ historical -n -s 2009-03-262022 Mar 27, 18:37 () /stocks/ca/ $ hcorr2022 Mar 27, 18:37 () /stocks/ca/ $
Three charts were created by the script:
Any function of the OpenBB Terminal can be automated, tables and images can be exported for any feature equipped with the '--export' flag. The possibilities are limitless here. Combine data exports with the data cache and import functionality of the economy and econometrics menu to unlock new, powerful, tools at the disposal of the open-source community.
Show us what your routine looks like!
Support the project: GitHub Twitter Discord Documentation
Original Link: https://dev.to/danglewood/foss-in-python-using-the-openbb-terminal-to-automate-processes-research-tasks-in-finance-2g7
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To