Datasets & Portfolios

Datasets & Portfolios

Prepare your market data and define the portfolio you want to analyze.

Overview

Scratio uses your historical market data to calculate portfolio risk.

Start by uploading a CSV dataset, then provide the portfolio you want to analyze.

Datasets

A dataset contains historical prices for one or more assets. Upload the dataset using the Dataset Upload API.

After a successful upload, Scratio returns a unique dataset_id. Use this ID when making a risk calculation.

See Dataset Upload and CSV Format for more information.

Portfolios

A portfolio defines which assets you want to analyze and the weight assigned to each asset.

{
  "portfolio": [
    {
      "symbol": "AAPL",
      "weight": 0.6
    },
    {
      "symbol": "MSFT",
      "weight": 0.4
    }
  ]
}

Portfolio assets must match the asset columns in your uploaded dataset, and the portfolio weights must sum to 1.0.

See Portfolio Input for the full format and validation rules.

Workflow

  1. Prepare your historical price data.
  2. Upload the CSV dataset.
  3. Save the returned dataset ID.
  4. Define your portfolio and asset weights.
  5. Use the dataset ID and portfolio in a risk calculation.