Pycharm 进程以退出代码 0 而不是实际输出结束
Pycharm Process finished with exit code 0 instead of actual output
所以我创建了一个非常基本的 python 价格获取机器人,但它实际上并没有显示任何结果,而只是说进程已完成,退出代码为 0
这是代码:
import pandas as pd
import pandas_datareader
from pandas.testing import assert_frame_equal
from gemini.gemini_core.gemini_master import Gemini
from gemini.helpers import poloniex, analyze
def cmo_trading_strategy(data, gemini):
pass
# TODO optimise params
PAIR = "BTC_USD"
PERIOD = 300
DAYS_HISTORY = 100
params = {
'capital_base': 100,
'data_frequency': 'D',
'fees': {
'open_fee': 0.01,
'close_fee': 0.01
}
}
if __name__ == '_main__':
def_df = poloniex.load_dataframe(pair=PAIR, period=PERIOD, days_history=DAYS_HISTORY)
backtesting_engine = Gemini(Logic=cmo_trading_strategy, sim_params=params, analyze=analyze.analyze_bokeh)
backtesting_engine.run(data=data_df)
print(data_df)
未经测试,我认为您输入错误:
def_df = poloniex.load_dataframe(pair=PAIR, period=PERIOD, days_history=DAYS_HISTORY)
应该是:
data_df = poloniex.load_dataframe(pair=PAIR, period=PERIOD, days_history=DAYS_HISTORY)
所以我创建了一个非常基本的 python 价格获取机器人,但它实际上并没有显示任何结果,而只是说进程已完成,退出代码为 0 这是代码:
import pandas as pd
import pandas_datareader
from pandas.testing import assert_frame_equal
from gemini.gemini_core.gemini_master import Gemini
from gemini.helpers import poloniex, analyze
def cmo_trading_strategy(data, gemini):
pass
# TODO optimise params
PAIR = "BTC_USD"
PERIOD = 300
DAYS_HISTORY = 100
params = {
'capital_base': 100,
'data_frequency': 'D',
'fees': {
'open_fee': 0.01,
'close_fee': 0.01
}
}
if __name__ == '_main__':
def_df = poloniex.load_dataframe(pair=PAIR, period=PERIOD, days_history=DAYS_HISTORY)
backtesting_engine = Gemini(Logic=cmo_trading_strategy, sim_params=params, analyze=analyze.analyze_bokeh)
backtesting_engine.run(data=data_df)
print(data_df)
未经测试,我认为您输入错误:
def_df = poloniex.load_dataframe(pair=PAIR, period=PERIOD, days_history=DAYS_HISTORY)
应该是:
data_df = poloniex.load_dataframe(pair=PAIR, period=PERIOD, days_history=DAYS_HISTORY)