
怎么回事

怎么回事
elite_simulation的版本是?
xiaohe wrote:
elite_simulation的版本是?
就是最新版,不然也打不开啊,好像是1.9.4。我就改了一个地方,把D:\veighna_elite_simulation\Lib\site-packages\vnpy\trader中的utility文件里面def _get_trader_dir改成了如下代码:
def _get_trader_dir(temp_name: str = ".vntrader") -> Tuple[Path, Path]:
d_drive_root = Path("D:/vnpy_elite_data/")
temp_path = d_drive_root.joinpath(temp_name)
if not temp_path.exists():
temp_path.mkdir(parents=True)
return d_drive_root, temp_path
不要修改任何elite版本中的模块代码,会导致冲突异常
MTF wrote:
不要修改任何elite版本中的模块代码,会导致冲突异常
卸载重装都不行。。。
我输入:
import elite_optionstrategy
print(dir(elite_optionstrategy))
反馈的是:
['APP_NAME', 'BaseApp', 'BaseEngine', 'ChainData', 'NewOptionBarGenerator', 'OptionBarGenerator', 'OptionData', 'OptionStrategyApp', 'Parameter', 'Path', 'PortfolioData', 'StrategyEngine', 'StrategyTemplate', 'Type', 'Variable', 'builtins', 'cached', 'compiled', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec', 'version', 'base', 'binomial_tree', 'black_76', 'black_scholes', 'calculate_time_left', 'client', 'engine', 'object', 'pricing', 'proxy', 'randint', 'template', 'utility']
里面根本就没有BacktestingEngine,课件上写from elite_optionstrategy import BacktestingEngine是怎么运行的。。。
from elite_optionstrategy.backtesting import BacktestingEngine试试