Libertà vo cercando, ch'è sì cara, come sa chi per lei vita rifiuta

Tag: python

Supervised learning regression analysis on Google stocks

Supervised learning on Google stock analysis and predictions

Abstract

We study some tech stock price through data visualization and some financial technique, focusing on those which are intended to give a sort of reliable prevision to permit brokers have a basis on which they could decide when it is the best moment to sell or buy stocks. We first analyze a year of data about the biggest companies as Amazon, Google, Apple and Microsoft but right after that we focus on Google stocks.

Next we leave the financial tools for supervised learning analysis. These machine learning processes learn a function from an input type to an output type using data comprising examples. Furthermore we’ll talk specifically of regression supervised learning, meaning that we’re interested in inferring a real valued function whose values corresponds to the mean of a dependant variable (stock prices).

We first applied linear regression on the last 6 years of Google Trends about the word ‘google’ specifically searched in the financial news domain, versus the last 6 years Google stock prices. From now on we change our feature domain with a multivariate input, i.e. we use other stock prices (AAPL, MSFT, TWTR, AMZN) to study the accuracy of others algorithms such as a multivariate linear regression, a SVR and a Random Forest.

keywords : Finance, Stock Price Analysis, MACD, Machine Learning, Linear Regression, SVR, Random Forest, Data Visualization, Python, R

What to do next ?

  • Do you see any error? Please tell me what to correct and why;
  • Implement these algorithms on other stocks and compare results
  • Add the r sqared to the RMSE comparison
  • Try to predict future stocks prices instead of contemporary ones
Amazon, Apple, Microsoft and Google pairplot

Amazon, Apple, Microsoft and Google pairplot

Controllo automatico della connessione rimanente, per rete 3 (tre.it)

Script per il controllo automatico (dalle 8:00 alle 23:00 ogni 30 min) della connessione  rimanente con l’abbonamento 3. In caso il valore sia inferiore ad uno preimpostato (500MB) invia un email d’allerta. E’ necessario essere connessi con la 3.

L’unica versione funzionante è la selenium, che necessita Firefox.

Ma con qualche piccola modifica sono sicuro che riusciate ad utilizzare Chrome se preferite, o a reindirizzarlo sul sito del vostro provider.

Se è effettivamente utile fatemelo sapere che si può migliorare facilmente. 🙂

Data mining – 2014 homeworks solutions

Homeworks solutions (pdf + code).

  1. Homework 1 – Sol
  2. Homework 2 – Sol
  3. Homework 3 – Sol
  4. Homework 4 – Sol
  5. Homework 5 – Sol
  6. Homework 6 – Sol

Download of tweets with Python

Our goal is to download a stream of tweets in Rome as they are created and create a web page that displays their location on Google maps.
We will need the help pf two modules : twython and pygmaps. The first to connect to the Twitter servers and to read the tweets, the second one to represent these tweets on the Google map.

So you will need to

  1. Install twython
  2. download the edited pygmaps module (or you can do it by yourself adding the Title functionality to the addpoint() function)
  3. download and test my script
  4. tweetMap

Powered by WordPress & Theme by Anders Norén