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 (YYYY-MM-DD) |
|
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 |
|---|---|
|
Directory containing |
|
Directory containing processed data |
METRICS: Data from economic indicators
Name |
Description |
|---|---|
|
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 |
|---|---|
|
Name of the investment fund |
|
Purchase date (YYYY-MM-DD) |
|
Sell date (YYYY-MM-DD) |
|
Number of shares (quotas) |
|
Application settlement (D0, D1, D2) |
|
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 (YYYY-MM-DD) |
|
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 |
|---|---|
|
List of selected CNPJ investments |
|
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 used for the simulation |
|
Number of days applied to the |
Example
"REDEEM": {
"INVESTMENT": "52.324.414/0001-70",
"DAYS_OFFSET": 5
}