Giter Site home page Giter Site logo

Comments (7)

anfederico avatar anfederico commented on June 3, 2024

Can I see the first 5 lines of your data file?

from clairvoyant.

vinodpkd avatar vinodpkd commented on June 3, 2024

Can I see the first 5 lines of your data file?

Here is the data format:

Date,Open,High,Low,Close,Volume
28-Oct-16,53.65,53.84,53.11,53.53,6620333
27-Oct-16,53.60,53.83,53.13,53.59,7899957
26-Oct-16,53.60,53.84,53.36,53.63,5817798
25-Oct-16,54.10,54.17,53.50,53.67,6052830
24-Oct-16,53.90,54.46,53.89,54.18,6919714

from clairvoyant.

anfederico avatar anfederico commented on June 3, 2024

One thing that may be an issue is your dates should be in the opposite order. Also, I don't see the variables that you listed in the header of your csv file.

variables = ["SSO", "SSC"] # If you set "SSO" and "SSC", they should be in your header

Try to format your data so it looks like this

Date,Open,High,Low,Close,Volume,SSO,SCC
03/01/2013,27.72,27.98,27.52,27.95,34851872,65.7894736842,-0.121
03/04/2013,27.85,28.15,27.7,28.15,38167504,75.9450171821,0.832
03/05/2013,28.29,28.54,28.16,28.35,41437136,84.9230769231,0.151
03/06/2013,28.21,28.23,27.78,28.09,51448912,80.7799442897,-0.689
03/07/2013,28.11,28.28,28.005,28.14,29197632,73.5368956743,-0.821

from clairvoyant.

vinodpkd avatar vinodpkd commented on June 3, 2024

Can I make
variables = []
instead of
variables = ["SSO", "SSC"]
I don't understand SSO and SSC.
I downloaded the data from google finance.

from clairvoyant.

vinodpkd avatar vinodpkd commented on June 3, 2024

data.iloc[0]
Out[20]:
Date 01/02/2013
Open 27.3
High 27.5
Low 27.13
Close 27.5
Volume 13268930
Name: 0, dtype: object

data.iloc[0].round(3)
Traceback (most recent call last):

File "", line 1, in
data.iloc[0].round(3)

File "C:\Anaconda2\lib\site-packages\pandas\core\series.py", line 1234, in round
result = _values_from_object(self).round(decimals, out=out)

TypeError: can't multiply sequence by non-int of type 'float'

data = data.round(3) # Round all values
is causing the error. Might it cannot round the date?

from clairvoyant.

uclatommy avatar uclatommy commented on June 3, 2024

vinodpkd, SSO and SSC are custom-designed indicators that the author is using to train his model. At the end of his readme he provides a link to another project that is producing these values. Looks like he's mining social media to provide a social sentiment score.

If you don't understand the values, I think you can use any other data to train your model. For example, p/e ratios if you're more familiar with that indicator. Basically this training data is essential for the model to "learn" how to indicate a buy or sell. It uses a probabilistic classifier to over a training set in order to develop an association between the indicators and a buy or sell recommendation. So I think before you can continue any further, you have to provide at least some data as the indicator.

from clairvoyant.

anfederico avatar anfederico commented on June 3, 2024

Exactly, for example I see your dataset contains the header:
"Date,Open,High,Low,Close,Volume"

You could then do something like variables = ["High", "Low"] and the program will attempt to learn when to buy and when to sell based on the High and Low values of your data. Note that this is probably not going to work because the raw High/Low values alone are not very predictive of how the stock price will move. Therefore, you should try different indicators, like P/E for example.

"Date,Open,High,Low,Close,Volume,P/E"

Hope this helps!

from clairvoyant.

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.