---
title: "Key Concepts"
canonical: https://www.quantconnect.com/docs/v2/lean-engine/data-format/key-concepts
markdown: https://www.quantconnect.com/docs/v2/lean-engine/data-format/key-concepts.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/06%20LEAN%20Engine/03%20Data%20Format/01%20Key%20Concepts
modified: 2026-10-28
index: https://www.quantconnect.com/llms.txt
---

# Key Concepts

[Documentation](https://www.quantconnect.com/docs/v2.md) > [LEAN Engine](https://www.quantconnect.com/docs/v2/lean-engine.md) > Data Format > Key Concepts

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

LEAN reads financial data from flat files on disk. The files use an open, human-readable format that doesn't depend on a database. Each data file is a CSV file in a zip archive. Each line of the CSV file is one data point, and the file has no header row.

## Folder Structure

LEAN organizes data files into folders by security type, market, and resolution. The following table shows the security type folder of each asset class:

| Asset Class | Folder |
| --- | --- |
| [US Equity](https://www.quantconnect.com/docs/v2/lean-engine/data-format/us-equity.md) | `equity` |
| [Equity Options](https://www.quantconnect.com/docs/v2/lean-engine/data-format/equity-options.md) | `option` |
| [Index](https://www.quantconnect.com/docs/v2/lean-engine/data-format/index.md) | `index` |
| [Index Options](https://www.quantconnect.com/docs/v2/lean-engine/data-format/index-options.md) | `indexoption` |
| [Futures](https://www.quantconnect.com/docs/v2/lean-engine/data-format/futures.md) | `future` |
| [Future Options](https://www.quantconnect.com/docs/v2/lean-engine/data-format/future-options.md) | `futureoption` |
| [Forex](https://www.quantconnect.com/docs/v2/lean-engine/data-format/forex-and-cfd.md) | `forex` |
| [CFD](https://www.quantconnect.com/docs/v2/lean-engine/data-format/forex-and-cfd.md) | `cfd` |
| [Crypto](https://www.quantconnect.com/docs/v2/lean-engine/data-format/crypto.md) | `crypto` |
| [Crypto Futures](https://www.quantconnect.com/docs/v2/lean-engine/data-format/crypto-futures.md) | `cryptofuture` |

The market folder separates assets that have the same ticker but trade on different exchanges or brokerages. For example, BTCUSDT trades on several exchanges at slightly different prices, so each exchange has its own folder under `crypto`.

In general, tick, second, and minute data have one zip file for each ticker and day, in a ticker folder. Hour and daily data have one zip file for many days, in the resolution folder. The following list shows the general path patterns:

- Tick, second, and minute: `<securityType> / <market> / <resolution> / <ticker> / <date>_<tickType>.zip`
- Hour and daily: `<securityType> / <market> / <resolution> / <ticker>.zip`

Options, Futures, and Crypto add more fields to these paths, and some zip files hold one CSV file for each contract. Each asset class page gives the exact paths. The following table describes the placeholders in the paths:

| Placeholder | Value |
| --- | --- |
| `<securityType>` | Security type folder from the first table |
| `<market>` | Lowercase market name, such as usa, cme, oanda, or coinbase |
| `<resolution>` | tick, second, minute, hour, or daily |
| `<ticker>` | Lowercase ticker |
| `<tickType>` | trade, quote, or openinterest |
| `<date>` | Date of the data in YYYYMMDD format |
| `<year>` | Year of the data in YYYY format |
| `<style>` | Option style: american or european |
| `<right>` | Option right: call or put |
| `<strike>` | Option strike price multiplied by 10,000 |
| `<expiry>` | Option expiry date in YYYYMMDD format |
| `<contractMonth>` | Futures contract month in YYYYMM format |

## Price Representation

Prices are in the [quote currency](https://www.quantconnect.com/docs/v2/writing-algorithms/trading-and-orders/key-concepts.md#05-Quote-Currency) of the asset. For example, the value 0.06920 for ETHBTC is the amount of BTC, the quote currency, that buys 1 ETH.

US Equity, Equity Options, and Index Options files store prices multiplied by 10,000. For example, a price of $644.80 is 6448000 in the file. LEAN divides these prices by 10,000 when it reads the files. The files of the other asset classes store the actual prices.

If a security has no activity in a period, the file has no row for that period.

## Time Representation

The first column of every row is the time. In tick, second, and minute files, the time is the number of milliseconds since midnight of the file date. Tick times can have a fractional part, such as 43.142. In hour and daily files, the time has the YYYYMMDD HH:mm format, such as 20140606 00:00. The time of a bar is the start of its period.

The times are in the data time zone of the security, which can differ from its exchange time zone. To find the data time zone, look up the `dataTimeZone` value of the security in the [`market-hours / market-hours-database.json`](https://github.com/QuantConnect/Lean/blob/master/Data/market-hours/market-hours-database.json) file. The keys of this file combine the security type, market, and ticker, such as `Equity-usa-[*]`. The `[*]` ticker applies to every ticker that has no entry of its own.

LEAN converts the times to the exchange time zone when it reads the files. For more information about time zones, see [Data Time Zone](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/time-zones.md#05-Data-Time-Zone).
