Package: macrobond-api-constants
Macrobond constantsA helper package to conveniently include the constants used by the Macrobond API.Installationpip install macrobond-api-constantsUsageThe namespace ismacrobond_api_constants.frommacrobond_api_constantsimportSeriesFrequencyasff.DAILYClassesThe constants are grouped into classes according to their usage.CalendarDateModeSpecifies which dates are included in a calendar.ValueDescriptionALL_SERIESUse the first or last time period where there is valid data in any series.ANY_SERIESUse the first or last time period where there is valid data in all series.CalendarMergeModeSpecifies how different calendars are merged into one.ValueDescriptionAVAILABLE_IN_ALLUse the time periods that are available in all series.AVAILABLE_IN_ANYUse the time periods that are available in any series.FULL_CALENDARUse all the time periods as specified by the frequency and weekdays.MetadataValueTypeSpecifies the different types of values in the meta data.ValueDescriptionBOOLBoolean typeDATEDate typeDOUBLEDouble typeINTInt typeSTRINGString typeSeriesFrequencySpecifies the different frequencies for the calendar.ValueDescriptionANNUALOnce a yearSEMI_ANNUALTwice a yearQUAD_MONTHLYOnce in 4 monthsQUARTERLYOnce in 3 monthsBI_MONTHLYEvery second monthMONTHLYOnce a monthWEEKLYOnce a weekDAILYOnce a dayLOWESTWhen specified in a series request, this corresponds to the lowest frequency of the series in setHIGHESTWhen specified in a series request, this corresponds to the highest frequency of the series in the requestSeriesMissingValueMethodSpecifies the different types of missing value handling.ValueDescriptionNONEDo not fill in missing values. They will remain NaN in the value vector.AUTODetermine the method based on the series classification.PREVIOUSUse the previous non-missing value.ZEROUse the value zero.LINEAR_INTERPOLATIONDo a linear interpolation between the previous and next non-missing values.SeriesPartialPeriodsMethodSpecifies the different types of partial period handling.ValueDescriptionNONEOnly include full periods of the lower frequencyAUTOAutomatically select method based on series propertiesREPEAT_LASTUse the last (or first) value to extend incomplete periodsFLOW_CURRENT_SUMUse the last (or first) partial average to extend incomplete periodsPAST_RATE_OF_CHANGEUse the previous (or next) year's rate of change to extend incomplete periodsZEROExtend incomplete periods with zeroesSeriesToHigherFrequencyMethodSpecifies the different types of frequency conversion methods when converting to a higher frequency.ValueDescriptionAUTODetermine the method based on the series classificationSAMEUse the same value for the whole periodDISTRIBUTEUse the first value of the time periodPERCENTAGE_CHANGEDistribute the percentage change over the periodLINEAR_INTERPOLATIONUse a linear interpolation of the values from this to the next periodPULSEUse the value for the first value of the periodQUADRATIC_DISTRIBUTIONUse quadratic interpolation to distribute the value over the periodCUBIC_INTERPOLATIONUse a cubic interpolation of the values from this to the next periodSeriesToLowerFrequencyMethodSpecifies the different types of frequency conversion methods when converting to a lower frequency.ValueDescriptionAUTODetermine the method based on the series classificationLASTUse the time periods that are available in all series.FIRSTUse the first value of the time periodFLOWAggregate the values of the time periodPERCENTAGE_CHANGEAggregate the percentage change over the periodHIGHESTUse the highest value in the time periodLOWESTUse the lowest value of the time periodAVERAGEUse the average value of the periodCONDITIONAL_PERCENTAGE_CHANGETODOSeriesWeekdaysSpecifies the different types of week days.ValueDescriptionSUNDAYSundayMONDAYMondayTUESDAYTuesdayWEDNESDAYWednesdayTHURSDAYThursdayFRIDAYFridaySATURDAYSaturdayFULLWEEKSun+Mon+Tue+Wed+Thu+Fri+SatMONDAY_TO_FRIDAYMon+Tue+Wed+Thu+FriSATURDAY_TO_THURSDAYSun+Mon+Tue+Wed+Thu+SatSATURDAY_TO_WEDNESDAYSun+Mon+Tue+Wed+SatSUNDAY_TO_THURSDAYSun+Mon+Tue+Wed+ThuMONDAY_TO_THURSDAY_AND_SATURDAYSun+Mon+Tue+Wed+Thu+Sat