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.
The interactive version of the chart above is available at math3d.org.
From a time perspective:
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py_pod-2.0.3.tar.gz
.
File metadata
- Download URL: py_pod-2.0.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397e28b9ca0c07099185055a15cf099877d9722b5e44fffb3657e3bb9c773eb5 |
|
MD5 | d2e1bae2cc48a2580b0706431b0f8e95 |
|
BLAKE2b-256 | 6503074296ad48947f6060fb51b0767c2d50ef59331ebc2b813dee44368ced7f |
File details
Details for the file py_pod-2.0.3-py3-none-any.whl
.
File metadata
- Download URL: py_pod-2.0.3-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3911cf9673dc63ea0f69b598b78956bbf98823b88bf9187c8f692de4cdef8778 |
|
MD5 | 337bd1417c234fba44ee1872c432c10b |
|
BLAKE2b-256 | 1735560428ad2914a52908dd08e24da4a80aaff07fbed14e4111036dea3e5fa8 |