Ejemplo n.º 1
0
#!/bin/usr/python3
import logging
from datetime import datetime
import socket

from msp_Logging import mspLog
if __name__ == "__main__":
    mspLog(name="msNowcast")

import numpy as np
import pandas as pd
import sys
import os
import configparser
import sqlalchemy

## 00 Own Modules
from getData import getData
from dynFAMissing import dynFAMissing
from dfForecast import dfForecast
from insertResultsMySQL import insertResultsMySQL
from backtesting import backtesting

## -- Main script for the Dynamic Factor Now-Casting Model -- ##
class nowcastModel(object):
    def __init__(self, configPath:str = "/repos/Nowcast/config/", runModel:bool=False, dev:bool=False):
        self.configPath = configPath
        self.dev = dev
        self.getConfig()
        self.getData = getData(configPath =self.configPath, dev=dev)
Ejemplo n.º 2
0
import os
import sys
import datetime
import logging

from msp_Logging import mspLog
if __name__ == "__main__":
    mspLog(name="msFcstPlots")

import numpy as np
import pandas as pd
import os
import sys
from optparse import OptionParser
import platform
import configparser
import sqlalchemy
import argparse
import calendar

import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['axes.labelsize'] = 9
rcParams['xtick.labelsize'] = 9
rcParams['ytick.labelsize'] = 9
rcParams['legend.fontsize'] = 9
from matplotlib.ticker import MaxNLocator
my_locater = MaxNLocator(8)
Ejemplo n.º 3
0
#!/bin/usr/python3
import logging
import datetime
import socket

from msp_Logging import mspLog
if __name__ == "__main__":
    mspLog(name="msForecasts")

import numpy as np
import pandas as pd
import os
import sys
from optparse import OptionParser
import platform
import configparser
import sqlalchemy
from msp_blpAPI import bloombergAPI
import argparse
import calendar
## Alternative to sqlalchemy
#import mysql.connector


class blpForecasts(object):
    def __init__(self, path: str = "/repos/Nowcast/", dev: bool = False):
        logging.info("Initiate the Bloomberg API")
        self.path = path
        self.dev = dev

        ## -- Config File -- ##
Ejemplo n.º 4
0
from msp_Logging import mspLog
if __name__ == "__main__":
    mspLog(name="msDownloadData")

import datetime
import logging
import traceback
import os
import subprocess
import shutil
from email.message import EmailMessage
import smtplib
import pandas as pd
import configparser
from pytz import timezone
import win32com.client
import pywintypes
import sys

## Own Modules
from msDbaseInterface import msMBDbInterface

class downloadData(object):

    def __init__(self, dev:bool=False):
        self.tz = timezone("Europe/London")
        try:
            self.config = configparser.ConfigParser()
            self.config.read('/repos/Nowcast/config/configNowcasting.ini')
        except Exception as e:
            servicemanager.LogErrorMsg(traceback.format_exc())