JSON Configuration

At the root of the project, there is a file named options_template.json. Make a copy of this file and remove the _template suffix from its name.

This file is divided into five main sections:

CONFIG

Defines the date range for data extraction.

Parameters

Name

Description

START_DATE

Start date (YYYY-MM-DD)

END_DATE

End date (YYYY-MM-DD)

Example

{
    "CONFIG": {
        "START_DATE": "2023-01-01",
        "END_DATE": "2023-12-31"
    }
}

DIR

Defines the directory structure used in the project.

Structure

  • CVM: Data from the Comissão de Valores Mobiliários

Name

Description

CSV_NAME

Directory containing .csv files

DATA_NAME

Directory containing processed data

  • METRICS: Data from economic indicators

Name

Description

CDI

Directory containing processed CDI (Certificado de Depósito Interbancário) data

Example

{
    "DIR": {
        "CVM": {
            "CSV_NAME": "csv",
            "ZIP_NAME": "zip",
            "DATA_NAME": "processed"
        },
        "METRICS": {
            "CDI": "cdi"
        }
    }
}

INVESTMENTS

Defines the list of investments selected by the user.

Each investment is identified by its CNPJ, using the format: XX.XXX.XXX/XXXX-XX.

Parameters

Name

Description

INVESTMENT_FUND

Name of the investment fund

PURCHASE_DATE

Purchase date (YYYY-MM-DD)

SOLD_DATE

Sell date (YYYY-MM-DD)

QUOTAS

Number of shares (quotas)

INVESTMENT_QUOTA

Application settlement (D0, D1, D2)

REDEEM_QUOTA

Redemption settlement (D0, D1, D2)

Example

{
    "INVESTMENTS": {
        "12.345.678/0001-99": {
            "INVESTMENT_FUND": "Example Fund",
            "PURCHASE_DATE": "2023-01-01",
            "SOLD_DATE": "2023-12-31",
            "QUOTAS": 200,
            "INVESTMENT_QUOTA": 0,
            "REDEEM_QUOTA": 0
        }
    }
}

METRICS

Defines the dates processed on the .csv.

Parameters

Name

Description

START_DATE

Start date (YYYY-MM-DD)

END_DATE

End date (YYYY-MM-DD)

Example

{
  "METRICS": {
    "CDI": {
      "START_DATE": "YYYY-MM-DD",
      "END_DATE": "YYYY-MM-DD"
    }
  }
}

CHARTS

Defines the data used to generate charts.

Parameters

Name

Description

INVESTMENT_CNPJ_LIST

List of selected CNPJ investments

METRICS_DICT

An object with metrics with a boolean criterion to be selected

The reason the first is a list and the second is a dictionary lies in the program’s design. Investments are selected and built based on the options.json, while the metrics are managed through a dedicated directory.

Example

"CHARTS": {
    "INVESTMENT_CNPJ_LIST": ["52.324.414/0001-70", "36.966.636/0001-30"],
    "METRICS_DICT": {
        "CDI": true,
        "Inflacao": false
    }
}

REDEEM

Defines the data used for investment simulation.

Parameters

Name

Description

INVESTMENT

Investment used for the simulation

DAYS_OFFSET

Number of days applied to the PURCHASE_DATE

Example

"REDEEM": {
    "INVESTMENT": "52.324.414/0001-70",
    "DAYS_OFFSET": 5
}