Commit a12f0fb3 authored by 李宗熹's avatar 李宗熹

添加个基评价

parent 33df3fe6
......@@ -305,8 +305,6 @@ class BaseConvexOptimizer(BaseOptimizer):
is_sector = [sector_mapper[t] == sector for t in self.tickers]
self._constraints.append(cp.sum(self._w[is_sector]) >= sector_lower[sector])
print(self._constraints)
def convex_objective(self, custom_objective, weights_sum_to_one=True, **kwargs):
"""
Optimise a custom convex objective function. Constraints should be added with
......
This diff is collapsed.
# import pymysql
from sqlalchemy import create_engine
db = create_engine(
'mysql+pymysql://tamp_fund:@imeng408@tamper.mysql.polardb.rds.aliyuncs.com:3306/tamp_fund?charset=utf8mb4')
'mysql+pymysql://tamp_fund:@imeng408@tamper.mysql.polardb.rds.aliyuncs.com:3306/tamp_fund?charset=utf8mb4',
pool_size=50,
pool_recycle=3600,
pool_pre_ping=True)
con = db.connect()
import logging
logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.INFO)
from app.utils.week_evaluation import *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment