Getting Started

Dataset & CSV Format

Learn how to prepare historical market data for portfolio risk calculations with the Quant Risk API.

Overview

Quant Risk API uses historical market data to estimate portfolio risk.

Before running a risk calculation, you must upload a CSV dataset containing historical price data for the assets in your portfolio.

After the dataset is uploaded successfully, the API returns a unique dataset identifier. You can then use that identifier when calling the risk calculation endpoint.

Dataset requirements

Your dataset should contain historical observations for every asset included in the portfolio calculation.

  • The dataset must be uploaded as a CSV file.
  • Each asset must have a consistent symbol.
  • Historical observations should be ordered by date.
  • Each asset included in the portfolio must exist in the uploaded dataset.
  • Price values must be numeric.

CSV structure

Quant Risk API expects historical price observations organized by date and asset symbol.

A typical dataset contains one date column followed by one column for each asset.

CSV
date,AAPL,BTC-USD
2026-01-01,185.20,42150.00
2026-01-02,186.75,42680.50
2026-01-03,184.90,41820.30
2026-01-04,188.10,43210.80
2026-01-05,190.25,44150.20

Required columns

The first column should identify the observation date. Each additional column represents an asset.

ColumnRequiredDescription
dateYesThe date associated with the historical market observation.
Asset columnsYesEach asset column contains historical price values for a specific asset symbol.

Example dataset

The following example contains historical prices for a portfolio consisting of Apple stock and Bitcoin.

market_data.csv
date,AAPL,BTC-USD
2026-01-01,185.20,42150.00
2026-01-02,186.75,42680.50
2026-01-03,184.90,41820.30
2026-01-04,188.10,43210.80
2026-01-05,190.25,44150.20
2026-01-06,189.80,43870.40
2026-01-07,192.10,44520.70

Symbol consistency

Asset column names must match the symbols used in your portfolio configuration.

Portfolio request
{
  "portfolio": [
    {
      "symbol": "AAPL",
      "weight": 0.6
    },
    {
      "symbol": "BTC-USD",
      "weight": 0.4
    }
  ]
}

In this example, AAPL and BTC-USD must exist both in the CSV header and in the portfolio request.

Supported assets

Quant Risk API does not restrict datasets to a predefined list of market symbols.

You provide the asset identifiers and historical price data that should be used in the calculation.

This allows datasets to contain equities, cryptocurrencies, indices, funds, or other assets, provided that their historical observations are represented consistently.

Missing data

Risk calculations require observations that can be aligned across all assets in the portfolio.

If some assets contain missing observations, the available data may be reduced to the dates where valid observations exist for all required assets.

Important

A large number of missing observations can reduce the amount of usable historical data and affect the quality of the risk estimate.

How datasets are used

The uploaded dataset is used to construct the historical information required by the selected risk model.

Monte Carlo Normal

Historical observations are used to estimate the statistical properties required for Monte Carlo simulation under a normal distribution assumption.

Monte Carlo Student's t

Historical observations are used to estimate the parameters required for Monte Carlo simulation with heavier-tailed return behavior.

Historical Simulation

Historical return observations are used directly to estimate the distribution of potential portfolio outcomes.

Common errors

Portfolio symbol not found

A symbol included in the portfolio request does not exist in the uploaded dataset.

Invalid price values

One or more price columns contain values that cannot be interpreted as numeric data.

Insufficient historical observations

The dataset does not contain enough usable historical observations for the selected risk calculation.

Invalid CSV structure

The uploaded file does not match the expected CSV structure.

Next steps

After preparing your dataset, you can upload it using the dataset upload endpoint.

Recommended next page

Learn how to upload datasets and manage dataset identifiers using the Dataset Upload API.