Skip to main content

pyalloq-core

pyalloq-core provides the foundational data structures, pure interfaces, and core abstractions for the PyAlloq quantitative portfolio optimization SDK.

Key Modules & Abstractions

  • MarketData: Standardized parameter object holding aligned price time-series (pd.DataFrame), optional asset features (dict[str, pd.DataFrame]), cross-sectional data, asset lists, risk-free rates, and risk aversion parameters. Includes zero-lookahead time slicing (slice_time).
  • BaseAllocator: Abstract base class for all portfolio allocation engines (Markowitz, Risk Parity, HRP, NCO, Deep Learning allocators, etc.).
  • BaseReturnEstimator: Abstract base class for expected return estimators (Classical, EWMA, Black-Litterman, Factor models, Deep Learning).
  • BaseCovarianceEstimator: Abstract base class for covariance matrix estimators (Empirical, EWMA, Ledoit-Wolf, Semi-covariance, RMT).
  • StrategyPipeline: Pipeline orchestrator linking return estimators, covariance estimators, and portfolio allocators into an end-to-end strategy execution object.
  • OptimizationResult: Standardized result container storing optimized portfolio weights, solver status, and metadata.

Installation

uv add pyalloq-core
# Or inside workspace
uv sync

Quick Example

import pandas as pd
from pyalloq_core.data import MarketData
from pyalloq_core.enums import ObjectiveFunction

# Create MarketData container
prices = pd.DataFrame(
    {"AAPL": [150.0, 152.5, 151.0], "MSFT": [300.0, 305.0, 302.0]},
    index=pd.date_range("2024-01-01", periods=3)
)

data = MarketData(prices=prices, risk_free_rate=0.04)

print(data.assets)  # ['AAPL', 'MSFT']
print(data.prices.head())

Metadata

Release files for pyalloq-core 0.1.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyalloq-core 0.1.18
File Size Uploaded
pyalloq_core-0.1.18.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyalloq-core 0.1.18
File Interpreter ABI Platform
pyalloq_core-0.1.18-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / pyalloq_core-0.1.18.tar.gz

Download URL pyalloq_core-0.1.18.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8a231de1ccc925a22c7f6afc215cdd74a4b9aab477097ce959ed0cf777741d8e
BLAKE2b-256 checksum
How to use checksums
7d24b2f5fb133c6abc3641fd6d76e9a71284d38c88d51e5cfea8460c8aec4e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyalloq_core-0.1.18-py3-none-any.whl

Download URL pyalloq_core-0.1.18-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8602911c8ef320d1d75468f7f320f87258fe06bb44a10027c11a7bf26366fdc
BLAKE2b-256 checksum
How to use checksums
9d802841f52216e2ca09a2d62b7a4e4072b14a66f9b3e4b5aa0df09ae1e86a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.18 This release

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page