from datetime import timedelta import gc import pymysql.cursors PDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.abspath(PDIR)) from settings import SmartAlphaPath, debug, get_portf_suffix SETT = SmartAlphaPath() sys.path.append(os.path.abspath(SETT.get_path_core())) from ta_instr_sum import get_instr_sum from ta_gen_chart_data import gen_chart from get_frc_pnl import get_forecast_pnl from get_trades import get_trades from sa_logging import log_this sys.path.append(os.path.abspath(SETT.get_path_pwd())) from sa_access import sa_db_access ACCESS_OBJ = sa_db_access() DB_USR = ACCESS_OBJ.username() DB_PWD = ACCESS_OBJ.password() DB_NAME = ACCESS_OBJ.db_name() DB_SRV = ACCESS_OBJ.db_server() ############################################################################################ # There is 6 steps to follow in this file. # 1. Import the model # 2. Reference model score value column # 3. Reference model score value column to retrieve from query # 4. Add model score column to the model score list # 5. Reference model target price with index # 6. Reference model function to be called ############################################################################################
# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import sys import os from datetime import timedelta import random import pymysql.cursors pdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.abspath(pdir) ) from settings import SmartAlphaPath, debug, get_portf_suffix sett = SmartAlphaPath() sys.path.append(os.path.abspath( sett.get_path_core() )) from ta_instr_sum import ForecastData sys.path.append(os.path.abspath( sett.get_path_pwd() )) from sa_access import sa_db_access access_obj = sa_db_access() db_usr = access_obj.username() db_pwd = access_obj.password() db_name = access_obj.db_name() db_srv = access_obj.db_server() class portf_data: """ Description Args: None Returns: None """ portf_multip = 0