Giter Club home page Giter Club logo

Comments (7)

TekpreXyz avatar TekpreXyz commented on May 18, 2024

this is python fundamental knowledge problem, it has nothing to do with the library, try to study the pandas module
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html

from finrl.

zyzhang1130 avatar zyzhang1130 commented on May 18, 2024

Thanks for those recourses, I think it is still somewhat relevant because in the way I would like to know that kind of format for the data the library can recognize (e.g. is that the library can only take in OHLC format?)

from finrl.

TekpreXyz avatar TekpreXyz commented on May 18, 2024

there are many formats; to my knowledge there is no single way to make them usable. Everyone has to create their own translation macro based on the data they want to work on.
Basically any trading library works on a dataframe in which the price refers to a certain time, nothing more than an ordered list.

from finrl.

zyzhang1130 avatar zyzhang1130 commented on May 18, 2024

Noted with thanks

from finrl.

TekpreXyz avatar TekpreXyz commented on May 18, 2024

however keep in mind that the standard ohlc format is necessary if it should be useful to work with indicator libraries such as Ta-lib

from finrl.

TekpreXyz avatar TekpreXyz commented on May 18, 2024

for example if you want to use slowk indicator from talib it's necessari that 'high', 'low', 'open' colum are present in your dataframe
otherwise it will fail
slowk, slowd = STOCH(input_arrays, 5, 3, 0, 3, 0, prices=['high', 'low', 'open'])
but if you only want work whit SMA you only need one price reference
from talib.abstract import *
output = SMA(input_arrays, timeperiod=25) # calculate on close prices by default
output = SMA(input_arrays, timeperiod=25, price='open') # calculate on opens

from finrl.

zyzhang1130 avatar zyzhang1130 commented on May 18, 2024

Thanks for the supplementary info!

from finrl.

Related Issues (20)

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.