powered by
Get the corresponding month for the string that represent maturities of futures contracts.
code2month(x)
a vector of integers
a character with letters that represent the month of maturity of futures contracts.
code2month(c("F", "G", "H", "J", "K", "M", "N", "Q", "U", "V", "X", "Z")) code2month(c("JAN", "FEV", "MAR", "NOV", "DEZ"))
Run the code above in your browser using DataLab