Translating R code to Python

Job ID: 32823641

Budget: $30 – $250 USD

I need to translate R code to Python. In particular, this function:
https://github.com/jstriaukas/midasml/blob/master/R/tscv.sglfit.R

It has 4 sub-functions in R and 1 sub-function in Fortran. The Fortran code should be linked to Python via numpy f2py.