update
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
配置模块 - 包含配置常量
|
||||
"""
|
||||
|
||||
from .settings import DEFAULT_SIMULATION_SETTINGS
|
||||
|
||||
__all__ = ['DEFAULT_SIMULATION_SETTINGS']
|
||||
+51
-17
@@ -1,19 +1,53 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
模拟配置常量
|
||||
"""
|
||||
"""配置文件"""
|
||||
|
||||
DEFAULT_SIMULATION_SETTINGS = {
|
||||
'instrumentType': 'EQUITY',
|
||||
'region': 'USA',
|
||||
'universe': 'TOP3000',
|
||||
'delay': 1,
|
||||
'decay': 0,
|
||||
'neutralization': 'INDUSTRY',
|
||||
'truncation': 0.08,
|
||||
'pasteurization': 'ON',
|
||||
'unitHandling': 'VERIFY',
|
||||
'nanHandling': 'OFF',
|
||||
'language': 'FASTEXPR',
|
||||
'visualization': False,
|
||||
}
|
||||
import os
|
||||
from typing import Dict, Any
|
||||
|
||||
|
||||
class Settings:
|
||||
"""应用配置"""
|
||||
|
||||
# 数据库配置
|
||||
DATABASE_CONFIG = {
|
||||
"host": "localhost",
|
||||
"port": "5432",
|
||||
"user": "jack",
|
||||
"password": "aaaAAA111",
|
||||
"database": "alpha"
|
||||
}
|
||||
|
||||
# API配置
|
||||
BRAIN_API_URL = "https://api.worldquantbrain.com"
|
||||
|
||||
# 模拟配置
|
||||
SIMULATION_SETTINGS = {
|
||||
'instrumentType': 'EQUITY',
|
||||
'region': 'USA',
|
||||
'universe': 'TOP3000',
|
||||
'delay': 1,
|
||||
'decay': 0,
|
||||
'neutralization': 'INDUSTRY',
|
||||
'truncation': 0.08,
|
||||
'pasteurization': 'ON',
|
||||
'unitHandling': 'VERIFY',
|
||||
'nanHandling': 'OFF',
|
||||
'language': 'FASTEXPR',
|
||||
'visualization': False,
|
||||
}
|
||||
|
||||
# 批处理配置
|
||||
BATCH_SIZE = 3
|
||||
CHECK_INTERVAL = 300 # 5分钟
|
||||
TOKEN_REFRESH_THRESHOLD = 1800 # 30分钟
|
||||
|
||||
# 通知配置
|
||||
GOTIFY_URL = "https://gotify.erhe.top/message?token=AvKJCJwQKU6yLP8"
|
||||
|
||||
@property
|
||||
def credentials_file(self) -> str:
|
||||
"""获取凭证文件路径"""
|
||||
return os.path.join(os.path.dirname(os.path.dirname(__file__)), 'account.txt')
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user