Giter Site home page Giter Site logo

Comments (4)

alvarobartt avatar alvarobartt commented on May 17, 2024 1

Hi, @AyseTheArk the date column has been included in the latest investiny release, so make sure to upgrade it as pip install investiny --upgrade and check that the installed version is 0.4.0! 😄

from investiny.

alvarobartt avatar alvarobartt commented on May 17, 2024

Hi @AyseTheArk so trendet was developed more than 2 years ago and I've not checked it since then, but note that it was developed using investpy so it's prepared to use its data, whose output was a pandas.DataFrame while investiny.historical_data is returning a Python dictionary. If you manage to load it as a pandas.DataFrame keep in mind that the "date" column needs to be renamed to "Date" and set as the index, while all the other columns need to be renamed to "Open", "High", "Low", and "Close", respectively.

from investiny.

AyseTheArk avatar AyseTheArk commented on May 17, 2024

@alvarobartt But the data does not have a 'date' column:
image
Also to use the code in https://github.com/alvarobartt/trendet the data seem to need more columns such as 'Up Trend', as these lines for example:

labels = df['Up Trend'].dropna().unique().tolist()

for label in labels:
    sns.lineplot(x=df[df['Up Trend'] == label].index,
                 y=df[df['Up Trend'] == label]['Close'],
                 color='green')

    ax.axvspan(df[df['Up Trend'] == label].index[0],
               df[df['Up Trend'] == label].index[-1],
               alpha=0.2,
               color='green')

use df['Up Trend'], while df is created like this:

df = trendet.identify_all_trends(stock='BBVA',
                                 country='Spain',
                                 from_date='01/01/2018',
                                 to_date='01/01/2019',
                                 window_size=5,
                                 identify='both')

which gave me the error code investpy function call failed with Exception: ERR#0015: error 403, try again later.!. So the problem was in creating the right data for the code on https://github.com/alvarobartt/trendet and the investiny.historical_data doesn't seem to be the right data for this. Is there an alternative data to use the trendet library?

from investiny.

AyseTheArk avatar AyseTheArk commented on May 17, 2024

Hi, @alvarobartt is that then the data I need for the df in the code on https://github.com/alvarobartt/trendet ?

from investiny.

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.