Code Monkey home page Code Monkey logo

daxiang_trade's People

Stargazers

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

Watchers

 avatar  avatar  avatar

daxiang_trade's Issues

Performance Update

Hi Dev,

Nice to see RSI strat is available now.
I saw the demo link, the performance is very good now, may i know what's the settings for that?

Thanks & Regards.

Adding new strat

Hi dev,

Congrats, finally it's on the run.
Found that current strategy is not yet effective (personally to me) since the result is negative for testing in few hours.

And since i am not a coder, could you please give a hint how to integrated this rsi strat into the module i use? Tried that manually but there is error in importing related to portfolio.py (error in importing MACD)

This could be another strat to use:

def relative_strength_index(df, n):
"""Calculate Relative Strength Index(RSI) for given data.

:param df: pandas.DataFrame
:param n: 
:return: pandas.DataFrame
"""
i = 0
UpI = [0]
DoI = [0]
while i + 1 <= df.index[-1]:
    UpMove = df.loc[i + 1, 'High'] - df.loc[i, 'High']
    DoMove = df.loc[i, 'Low'] - df.loc[i + 1, 'Low']
    if UpMove > DoMove and UpMove > 0:
        UpD = UpMove
    else:
        UpD = 0
    UpI.append(UpD)
    if DoMove > UpMove and DoMove > 0:
        DoD = DoMove
    else:
        DoD = 0
    DoI.append(DoD)
    i = i + 1
UpI = pd.Series(UpI)
DoI = pd.Series(DoI)
PosDI = pd.Series(UpI.ewm(span=n, min_periods=n).mean())
NegDI = pd.Series(DoI.ewm(span=n, min_periods=n).mean())
RSI = pd.Series(PosDI / (PosDI + NegDI), name='RSI_' + str(n))
df = df.join(RSI)
return df

Appreciate for your kindly help.
Thanks & regards.

Update

Hi Dev,
Where is the code on main? Any updates?
Thanks

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.