.. _api-reference:

API
===

The pyfolio API is organized into various modules:

* Tear Sheets: :mod:`pyfolio.tears`
* Time Series Metrics: :mod:`pyfolio.timeseries`
* Plotting Functions: :mod:`pyfolio.plotting`
* Performance Attribution: :mod:`pyfolio.perf_attrib`
* Utilities: :mod:`pyfolio.utils`

Tear Sheets
-----------

Pyfolio combines key portfolio metrics in thematic plots and summary tear sheets.

.. automodule:: pyfolio.tears
    :members:
    :undoc-members:
    :show-inheritance:

Time Series Metrics
-------------------

The module :mod:`pyfolio.timeseries` provides performance and risk metrics.

.. automodule:: pyfolio.timeseries
    :members:
    :undoc-members:
    :show-inheritance:

Performance Attribution:
------------------------

The module :mod:`pyfolio.perf_attrib` provides performance and risk metrics.

.. automodule:: pyfolio.perf_attrib
    :members:
    :undoc-members:
    :show-inheritance:

Plotting Functions
------------------

The module :mod:`pyfolio.plotting` facilitates the visualization of performance metrics.

.. automodule:: pyfolio.plotting
    :members:
    :undoc-members:
    :show-inheritance:

Utilities
---------

The module :mod:`pyfolio.utils` contains various helper functions, e.g. to format factor data into the requisite input format.

.. automodule:: pyfolio.utils
    :members:
    :undoc-members:
    :show-inheritance:
