Skip to content

Commit

Permalink
docs examples structure
Browse files Browse the repository at this point in the history
  • Loading branch information
enzbus committed Dec 16, 2023
1 parent d7b1315 commit e1e82b2
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 10 deletions.
10 changes: 5 additions & 5 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Examples
Many `example scripts are available in the code repository. <https://github.com/cvxgrp/cvxportfolio/tree/master/examples>`_
We show some of them, along with their results, in the following pages:

.. - :doc:`Hello World example <hello_world>`
.. - :doc:`Case-Shiller example <examples/case_shiller>`
.. toctree::
:maxdepth: 2

hello_world
examples/case_shiller
examples/dow30
examples/dow30
examples/timing
examples/universes
examples/etfs
examples/paper_examples
4 changes: 2 additions & 2 deletions docs/examples/case_shiller.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Case-Shiller Example
====================
Case-Shiller multi-period
=========================

This is an example that shows that Cvxportfolio can work as well with
different asset classes, in this case a real estate portfolio. We use
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/dow30.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
DOW30 Example
DOW30 monthly
=============

This example script is
`available in the repository <https://github.com/cvxgrp/cvxportfolio/blob/master/examples/dow30_example.py>`_.
`available in the repository <https://github.com/cvxgrp/cvxportfolio/blob/master/examples/dow30.py>`_.
See the docstring below for its explanation.

.. literalinclude:: ../../examples/dow30_example.py
.. literalinclude:: ../../examples/dow30.py
:language: python

This is the output printed to screen when executing this script. You can see
Expand Down
8 changes: 8 additions & 0 deletions docs/examples/etfs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Wide asset classes ETFs
=======================

This example script is
`available in the repository <https://github.com/cvxgrp/cvxportfolio/blob/master/examples/etfs.py>`_.

.. literalinclude:: ../../examples/etfs.py
:language: python
7 changes: 7 additions & 0 deletions docs/examples/paper_examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Original examples from the paper
================================

.. toctree::
:maxdepth: 2

paper_examples/data_risk_model
10 changes: 10 additions & 0 deletions docs/examples/paper_examples/data_risk_model.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Data and risk model estimates
=============================

This example script is
`available in the repository
<https://github.com/cvxgrp/cvxportfolio/blob/master/examples/paper_examples/data_risk_model.py>`_.
See the docstring below for its explanation.

.. literalinclude:: ../../../examples/paper_examples/data_risk_model.py
:language: python
8 changes: 8 additions & 0 deletions docs/examples/timing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Timing of back-test
===================

This example script is
`available in the repository <https://github.com/cvxgrp/cvxportfolio/blob/master/examples/timing.py>`_.

.. literalinclude:: ../../examples/timing.py
:language: python
12 changes: 12 additions & 0 deletions docs/examples/universes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Stock universes
===============

This example module is
`available in the repository <https://github.com/cvxgrp/cvxportfolio/blob/master/examples/universes.py>`_.
See the docstring below for its explanation. It's used by other examples
to get lists of stock tickers corresponding to various indexes. We run
it periodically to update the lists to the current constituents of each
index.

.. literalinclude:: ../../examples/universes.py
:language: python
Empty file.
File renamed without changes.

0 comments on commit e1e82b2

Please sign in to comment.