Creating a Futures Type “make_data” File

Creating Categories, Symbols and Columns

Using a text editor, create the make_data file to establish categories, symbols, and columns. After creating the make_data file, use the Package Maker software to load the data into the MIM. This document outlines the creation of the make_data and data files as well as special naming conventions to follow for futures type data. See Loading Data using the Package Maker for instructions on loading data using the Package Maker.

The addition of categories and symbols is accomplished by using the relation_add command. Columns are added using the column_add command.

#The "database_narrow" command limits which database will be accessed.
database_narrow {database = ~/data.widgets/xmim.mim;}
#The "lock_files" command locks the database and is required when adding or changing data.
lock_files
#Commands that tell the load_updates.sh script to only log certain errors and ignore others
suppress_duplicate_add
suppress_duplicate_delete
#BODY OF MAKE_DATA
#Add initial folder structure;
#This section creates a category named "WidgetsInc" under the existing "Other" category.
#This is assigned to be a category by identifying the "type" as a "category".
relation_add
{
   parent      = TopRelation:Other;
   name        = WidgetsInc;
   type        = category;
   description = "WidgetsInc Data";
}
#This section creates a category named "WID_Forwards" under the "WidgetsInc" category
relation_add
{
   name        = WID_Forwards;
   parent      = TopRelation:Other:WidgetsInc;
   type        = category;
}
#This section creates a category named "WID_Electricity" under the "WID_Forwards" category
relation_add
{
   name        = WID_Electricity;
   parent      = TopRelation:Other:WidgetsInc:WID_Forwards;
   type        = category;
}
#This section creates a symbol named "WID.NYISOE.ONPEAK" Note that the command is "type=futures"
relation_add
{
   parent      = TopRelation:Other:WIdgetsInc:WID_Forwards:WID_Electricity;
   name        = WID.NYISOE.ONPEAK;
   type        = futures;
   description = "WID Forwards, NY-ISO E, On Peak";
}
#This section creates a symbol named "WID.NYISOE.OFFPEAK" Note that the command is "type=futures"
relation_add
{
   parent      = TopRelation:Other:WIdgetsInc:WID_Forwards:WID_Electricity;
   name        = WID.NYISOE.OFFPEAK;
   type        = futures;
   description = "WID Forwards, NY-ISO E, Off Peak";
}
#Bind the column "Close" to the folder names for On & Off Peak. 
relation_column_add
{
   relation    = TopRelation:Other:WIdgetsInc:WID_Forwards:WID_Electricity:WID.NYISOE.ONPEAK;
   column      = Close;
}
relation_column_add
{
   relation    = TopRelation:Other:WIdgetsInc:WID_Forwards:WID_Electricity:WID.NYISOE.OFFPEAK;
   column      = Close;
}
#Add the individual month curve names.
#In this section, we assign names for the futures contracts.
# expiration_day = "20210131";
# expiration_day = "31-January-2021";
# expiration_day = "01/31/2021";
# expiration_day = "01-31-2021";
# expiration_day = "Jan 31, 2021";
# expiration_day = "Jan. 31, 2021";
# expiration_day = "January 31, 2021";
relation_add
{
   name           = WID.NYISOE.ONPEAK_2020Z;
   parent         = TopRelation:Other:WidgetsInc:WID_Forwards:WID_Electricity:WID_NYISOE.ONPEAK;
   type           = futures_contract;
   expiration_day = "20201231";
}
relation_add
{
   name           = WID.NYISOE.ONPEAK_2021F;
   parent         = TopRelation:Other:WidgetsInc:WID_Forwards:WID_Electricity:WID_NYISOE.ONPEAK;
   type           = futures_contract;
   expiration_day = "20210131";
}
relation_add
{
   name           = WID.NYISOE.ONPEAK_2021G;
   parent         = TopRelation:Other:WidgetsInc:WID_Forwards:WID_Electricity:WID_NYISOE.ONPEAK;
   type           = futures_contract;
   expiration_day = "20210228";
}
relation_add
{
   name           = WID.NYISOE.OFFPEAK_2020Z;
   parent         = TopRelation:Other:WidgetsInc:WID_Forwards:WID_Electricity:WID_NYISOE.OFFPEAK;
   type           = futures_contract;
   expiration_day = "20201231";
}
relation_add
{
   name           = WID.NYISOE.OFFPEAK_2021F;
   parent         = TopRelation:Other:WidgetsInc:WID_Forwards:WID_Electricity:WID_NYISOE.OFFPEAK;
   type           = futures_contract;
   expiration_day = "20210131";
}
relation_add
{
   name           = WID.NYISOE.OFFPEAK_2021G;
   parent         = TopRelation:Other:WidgetsInc:WID_Forwards:WID_Electricity:WID_NYISOE.OFFPEAK;
   type           = futures_contract;
   expiration_day = "20210228";
}
#The "unlock_files" command unlocks the database. This is a required field.
unlock_files
database_widen

Creating Continuous Contracts

The following make_data file shows how to create a continuous contract name and assign the pertinent information to the contract.

lock_files
relation_add {
   name            = WID.NYISOE.ONPEAK_02;
   parent          = TopRelation:Other:WIdgetsInc:WID_Forwards:WID_Electricity:WID.NYISOE.ONPEAK;
   type            = futures_continuous;
   rollover_date   = "expiration day";
   rollover_policy = "2 nearby actual prices";
}