> For the complete documentation index, see [llms.txt](https://indexone.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://indexone.gitbook.io/docs/product-guides/index-construction/how-to-use-custom-code-to-build-an-index.md).

# How to use custom code to build an index

## Step 1 - Click on "Index Builder"

<figure><img src="/files/w5jnvgNrPmYUSQUryfv2" alt=""><figcaption></figcaption></figure>

Navigate to ["Index Builder"](https://indexone.io/indexbuilder) to access the indexing platform.

## Step 2 - Click on "Use Custom Universe"

<figure><img src="/files/8u29767Zg97Mhxm8V1GV" alt=""><figcaption></figcaption></figure>

Click on "Use Custom Universe" to view all options on how you can upload your custom universe.

## Step 3 - Click on "Custom Code"

<figure><img src="/files/Hpfh0a3pGoPyaBqiaxg7" alt=""><figcaption></figcaption></figure>

Click on "Custom Code" and test your code.

**If you have a file you would like to upload instead...**\
\
Click on "Upload Universe" and select the file type that you would like to upload.

<figure><img src="/files/dRFwN1U5zNlUXUMGxCEe" alt=""><figcaption></figcaption></figure>

## Step 4 - Test your code

<figure><img src="/files/bYsDazN6FaMU09HhcsYN" alt=""><figcaption></figcaption></figure>

Test and save your code. Once you're happy with it, create the bactest of your custom index.

## Step 5 - Click "Create Backtest"

<figure><img src="/files/hWvX5onB62cOljiMHiX6" alt=""><figcaption></figcaption></figure>

Click "create backtest" to load a backtest of your index. A backtest usually takes between 1-3 minutes, depending on the number of data points being processed by the platform.

<figure><img src="/files/CXZJUE2Ox0xdwvxHA9Pn" alt=""><figcaption></figcaption></figure>

Once the backtest has loaded, you can view its index performance benchmarked against SPY (SPDR S\&P 500 ETF Trust) and VT (Vanguard Total World Stock Index Fund ETF), as well as other metrics such as rolling volatility, drawdown, total turnover and rebalance statistics.

## Step 6 - Launch your new index

<figure><img src="/files/Bkg4nQW8Bdgbw9wspLJg" alt=""><figcaption></figcaption></figure>

Navigate to the "Go Live" arrows on the top left corner to name your new index, insert a description of the index, set calculation frequency, timezones, start/end time and visibility of the index (Public, Team Visible or Private).&#x20;

Once you've filled out the details of your index, click "Launch."

<figure><img src="/files/y3I8OVE2nXgJ0eVTqgRF" alt=""><figcaption></figcaption></figure>

It's as easy as that. Find out how you can build your own index on Index One's [index builder](https://indexone.io/indexbuilder).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indexone.gitbook.io/docs/product-guides/index-construction/how-to-use-custom-code-to-build-an-index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
