Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Amichay Oren <[email protected]>
  • Loading branch information
amor71 committed Nov 21, 2020
1 parent ea1a3aa commit 9a1faf4
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 11 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ LiuAlgoTrader `quickstart` wizard installs samples allowing a first-time experie

Additional samples can we found in the [examples](examples) directory.

## Analysis & Analytics

The framework includes a wide ranges of analysis `Jupyter Notebooks`, as well as `streamlit` applications for analysis for both trading and back-testing sessions. To name a few of the visual analytical tools:
* tear-sheet analysis,
* anchored-vwaps,
* indicators & distributions

## What's Next?

Read the [documentation](https://liualgotrader.readthedocs.io/en/latest/) and learn how to use LiuAlgoTrader to develop, deploy & testing money making strategies.
Expand Down
48 changes: 43 additions & 5 deletions docs/source/Analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Liu Analysis Tool-box
for analysing portfolio, trader, and back-testing sessions.

.. _notebooks:
https://github.com/amor71/LiuAlgoTrader/blob/master/analyis_notebooks/portfolio_performance_analysis.ipynb
https://github.com/amor71/LiuAlgoTrader/blob/master/analysis/notebooks/portfolio_performance_analysis.ipynb

.. # define a hard line break for HTML
.. |br| raw:: html
Expand All @@ -18,14 +18,52 @@ prerequisites
1. Both `APCA_API_KEY_ID` and `APCA_API_SECRET_KEY` environment variables should be properly set and include the credentials to Alpaca Markets account (can be either PAPER or LIVE),
2. Environment variable `DSN` holds valid DB connection string,

Anchored-VWAP Notebook
----------------------

Tear Sheet
----------
The `anchored vwap`_ analysis notebook calculates and visualizes anchored vwaps on top of an interactive stock candlestick diagram, with volume .

.. _anchored vwap:
https://github.com/amor71/LiuAlgoTrader/tree/master/analysis/notebooks/anchored-vwap-lab.ipynb

prerequisites
*************
if you do not have `pyplot` installed:

.. code-block:: bash
pip install pyplot
running the notebook
********************

once loaded, the top of the notebook looks like:


.. image:: /images/anchored-1.png
:width: 1000
:align: left
:alt: anchored vwap top of notebook


The list `anchored_vwaps_start` holds start timestamps for anchored VWAPs, per `symbol` between the `start_date` and `end_date`.

Once executed, the output generated includes an interactive candlestick diagram including the selected anchored VWAPs:

.. image:: /images/anchored-2.png
:width: 1000
:align: left
:alt: anchored vwaps example



Tear Sheet Notebook
-------------------

The `tear sheet`_ analysis notebook provide basic means to analyze your portfolio performance over time.

.. _tear sheet:
https://github.com/amor71/LiuAlgoTrader/tree/master/analyis/notebooks/tear_sheet.ipynb
https://github.com/amor71/LiuAlgoTrader/tree/master/analysis/notebooks/tear_sheet.ipynb

The top of the notebook looks like:

Expand Down Expand Up @@ -137,7 +175,7 @@ Prerequisites
3. Download the latest version of backtester analysis notebook_.

.. _notebook :
https://github.com/amor71/LiuAlgoTrader/blob/master/analyis_notebooks/backtest_performance_analysis.ipynb
https://github.com/amor71/LiuAlgoTrader/blob/master/analysis/notebooks/backtest_performance_analysis.ipynb

Usage
*****
Expand Down
6 changes: 3 additions & 3 deletions docs/source/Quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if you follow the installation till the end, the wizard will direct you how to r

.. code-block:: bash
streamlit run https://raw.github.com/amor71/LiuAlgoTrader/master/analyis/backtester_ui.py
streamlit run https://raw.github.com/amor71/LiuAlgoTrader/master/analysis/backtester_ui.py
Once executed, your screen should look like this:

Expand All @@ -63,8 +63,8 @@ Once executed, your screen should look like this:
Select the `Analyzer` app on the upper-right drop-down and enter
'2398380c-5146-4b58-843a-a50c458c8071' as a pre-loaded batch-id.

Voila!
^^^^^^
`Voila!`
^^^^^^^^
You should be now seeing a pre-loaded session from your local database.
You're all set now.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/Usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ To run the tool type:

.. code-block:: bash
streamlit run https://raw.github.com/amor71/LiuAlgoTrader/master/analyis/backtester_ui.py
streamlit run https://raw.github.com/amor71/LiuAlgoTrader/master/analysis/backtester_ui.py
Once the browser opens, it would look like:

Expand Down
3 changes: 3 additions & 0 deletions docs/source/What's New.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ What's New
+------------------+----------------------------------------------+
| Release | Notes |
+------------------+----------------------------------------------+
| 0.0.76 | adding `anchored-vwap` calculation, and |
| | notebook w/ advanced visuals. |
+------------------+----------------------------------------------+
| 0.0.74 | 1. adding `symbol` and `duration` parameters |
| | to `backtester`, updated documentation, |
| | 2. clean-ups to back-testing notebook. |
Expand Down
Binary file added docs/source/images/anchored-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/images/anchored-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion liualgotrader/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.75"
__version__ = "0.0.76"
2 changes: 1 addition & 1 deletion liualgotrader/liu
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def quickstart():
print("2. run the env-vars script ('env_vars.bat'),")
else:
print("2. run the env-vars script ('source env_vars.sh'),")
print(f"3.`streamlit run https://raw.github.com/amor71/LiuAlgoTrader/master/analyis/backtester_ui.py`")
print(f"3.`streamlit run https://raw.github.com/amor71/LiuAlgoTrader/master/analysis/backtester_ui.py`")
if restore_sample_db:
print("4. On the app selection select the 'analyzer` app")
print("5. copy and paste the batch-id '2398380c-5146-4b58-843a-a50c458c8071' and press <enter>")
Expand Down

0 comments on commit 9a1faf4

Please sign in to comment.