Skip to main content

Implementation of a Proper Orthogonal Decomposition (POD) method

Project description

Proper Orthogonal Decomposition

Principle

The package contains a processing algorithm for decomposing an input using a limited number of predefined signals from a bigger set.

Decomposition is performed by iterating projections onto the straight lines generated by the reference signals.

The proposed algorithm takes a vector space approach. A signal, or more precisely its sequence of N temporal samples, is mapped to a point P in a vector space of dimension N. A value taken by a signal P at sample time ti becomes the coordinate of P along the axis ti.

The set of reference signals represents a library the algorithm micks from in order to synthetize or approximate any input. The reference points form a cloud in the space described above. A linear combination of appropriately selected reference points will approximate the target signal S.

Use case: asset replication

In order to illustrate how the algorithm works, let's assume we replicate a fund using two assets stock 1 and stock 2, with only 3 data points for past performances.

Day 1 Day 2 Day 3
Stock 1 0.8 2 0
Stock 2 1.2 -0.5 0
Fund 1 -1 3
Replication 1 -1 0

The chart below shows the first and final projections in the case of a 3D space: 3 daily performances for a 2 stocks-universe, plus a target fund to replicate.

The first projection is performed on the second stock (yellow), since it better matches the fund performances than those of the first stock.

Example showing the first and final projections in the case of a 3D space

The interactive version of the chart above is available at math3d.org.

From a time perspective: Example showing the time series

Typical sizes for asset replication: 1000 dimensions (~5 years of daily data), 200 candidate assets for use in replication, target portfolio with 5 assets.

Documentation

Generated with PyDoctor:

pydoctor --make-html --html-output=docs/api pod

Publication

poetry build

poetry publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_pod-2.0.3.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

py_pod-2.0.3-py3-none-any.whl (20.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page