Giter Club home page Giter Club logo

onepy's People

Contributors

chandlercjy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onepy's Issues

ModuleNotFoundError: No module named 'retry'

"""
Traceback (most recent call last):
File "E:/game/OnePy/examples/tutorial.py", line 2, in
import OnePy as op
File "E:\game\OnePy\OnePy_init_.py", line 2, in
from OnePy.main import OnePiece
File "E:\game\OnePy\OnePy\main.py", line 11, in
from OnePy.sys_module.components.output import OutPut
File "E:\game\OnePy\OnePy\sys_module\components\output.py", line 5, in
from OnePy.utils.awesome_func import dict_to_table
File "E:\game\OnePy\OnePy\utils\awesome_func.py", line 7, in
from retry import retry
ModuleNotFoundError: No module named 'retry'
"""

from retry import retry
should to be
from retrying import retry?

base_reader.py

你好!
想请教一下,在你的base_reader.py中load方法,从csv或者mongodb读取之后最终返回的是什么内容?是dataframe?dict?

do you have a complete CSV reader backtesting example?

hi chandler cjy
do you have a complete CSV reader backtesting example?
I have tried to modify your module to trial stock backtesting with downloaded CSV data.
but not work, error msg below:

AttributeError Traceback (most recent call last)
in
----> 1 go.sunny(show_process=True)

AttributeError: 'CSVReader' object has no attribute 'sunny'

can you please suggest , how to fix this issue?
thanks a lot,

import OnePy as op
from OnePy.custom_module.cleaner_sma import SMA

class SmaStrategy(op.StrategyBase):

def __init__(self):

    super().__init__()
    self.sma1 = SMA(3, 40).calculate
    self.sma2 = SMA(5, 40).calculate

def handle_bar(self):
    for ticker in self.env.tickers:

        if self.sma1(ticker) > self.sma2(ticker):

            self.buy(100, ticker, takeprofit=15,
                     stoploss=100)
        else:
            self.sell(100, ticker)

TICKER_LIST = ['^DJI'] # 多品种
INITIAL_CASH = 20000
FREQUENCY = 'D'
START, END = '2015-08-07', '2018-08-07'

实例化策略,会自动添加到env.strategies中

SmaStrategy()

如果用CSV回测,注意csv文件名为name_frequency,同时要将下面MongoDB回测注释掉

go = op.data_readers.CSVReader('C:\Users\jarod\OnePy-master\data\', file_name='000001', ticker='^DJI')
#go = op.backtest.stock(TICKER_LIST, FREQUENCY, INITIAL_CASH, START, END) # 设置好股票回测的基本配置
#go = op.backtest.stock(TICKER_LIST, FREQUENCY, INITIAL_CASH, START, END)

go.sunny(show_process=True)

signals.py 里面的 dataclasses模块

你好,我已经pip安装了dataclasses模块了,但是仍然显示

ModuleNotFoundError: No module named 'dataclasses'
Process finished with exit code 1

请问这个如何解决。

谢谢!

运行 python csv_to_MongoDB.py 出错

您好,非常感谢您的代码,我对py还不熟悉,类这关卡一直没过... 我运行案例里面的csv_to_MongoDB.py 报错

C:\OnePy\examples>c:\py36\python csv_to_MongoDB.py
Traceback (most recent call last):
File "csv_to_MongoDB.py", line 3, in
from OnePy.tools.to_Mongodb import Forex_CSV_to_MongoDB
File "c:\py36\lib\site-packages\OnePy\tools\to_Mongodb.py", line 11, in
from ..broker import oanda
ModuleNotFoundError: No module named 'OnePy.broker'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.