<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Edoardo Ganetti on Medium]]></title>
        <description><![CDATA[Stories by Edoardo Ganetti on Medium]]></description>
        <link>https://medium.com/@ganetti?source=rss-88ee9b55fe9f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*amyZaOc0lpTX2mfm3J5VZQ.jpeg</url>
            <title>Stories by Edoardo Ganetti on Medium</title>
            <link>https://medium.com/@ganetti?source=rss-88ee9b55fe9f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 20:03:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ganetti/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Cos’e’ la Blockchain, spiegatelo a vostra Zia]]></title>
            <link>https://ganetti.medium.com/cose-la-blockchain-spiegatelo-a-vostra-zia-8db81fbd3fee?source=rss-88ee9b55fe9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8db81fbd3fee</guid>
            <category><![CDATA[bitcoin-italia]]></category>
            <category><![CDATA[italiano]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <dc:creator><![CDATA[Edoardo Ganetti]]></dc:creator>
            <pubDate>Fri, 15 Jan 2021 15:11:30 GMT</pubDate>
            <atom:updated>2021-01-15T15:11:30.747Z</atom:updated>
            <content:encoded><![CDATA[<p>La Blockchain e’ un registro di transazioni decentralizzato. Ti ricordi i registri, quelli a mano dove i bar segnavano i conti dei clienti “segna a tizio, segna a caio o segna segna che poi ti pago…”. Oppure i registri di quando andavamo a scuola e segnavano le assenze. Oppure i registri delle banche con le somme dei conti correnti.</p><p>La blockchain e’ un registro che segna quanto passa da un conto all’altro, il conto e’ identificato da un indirizzo che e’ un numero un po’ strano, tipo questo “0xjmioju3h1231jj3o12j31” (ho digitato a caso sulla tastiera non perdete tempo a cercarlo). E’ un po’ bruttino a vedersi lo so, ma fai conto che sia un IBAN.</p><p>La genialata della blockchain e’ che invece di essere un registro unico, scritto da qualche parte tipo su un hard disk di un computer, e’ invece scritto su più computer. Questo significa decentralizzato: non c’e’ solo una persona che lo tiene ma ci sono tante persone, anzi tanti computer, che lo tengono simultaneamente e che vedono le stesse cose che ci sono scritte.</p><p><strong>“<em>Ma come si fa a far tenere un registro da più persone? E chi verifica se non c’è il professore o il padrone del bar? Sarebbe come se gli alunni si segnassero le assenze o i clienti segnassero i propri conti al bar…</em>”</strong></p><p>Beh, mettiamo che siamo in 10 persone in una stanza, e vogliamo scambiarci dei soldi, non ha senso usare la banca e pagarci le commissioni, no? Facciamo che ognuno di noi tiene un registro, e scriviamo le transazioni (quello che vogliamo scambiarci) su dei pezzi di carta, poi facciamo girare i pezzi di carta in modo che ognuno li riceva tutti ed alla fine abbiamo scritto tutti le stesse cose sul registro, giusto? Quindi facciamo i conti e vediamo a chi spetta cosa.</p><p>I pezzi di carta del nostro esempio sono i blocchi, da qui block-chain catena di blocchi. I blocchi sono pieni di transazioni.</p><p>Nella realtà ogni computer in rete può aggiungere dei blocchi alla catena, non serve qualcuno di centrale come il professore o il padrone del bar ma basta che il 50% dei computer sia d’accordo su quello che c’e’ scritto nel registro e ci sono dei meccanismi, come il block reward, che incentivano i computer a non barare.</p><p><strong>“<em>Aspetta aspetta… una catena di blocchi aggiunti da diversi computer in rete, Block Reward… avevi promesso che era spiegato in parole povere…</em>”</strong></p><p>Si’ ok proprio semplicissimo non e’, facciamo un disegnino:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/0*s-8304Kq3yor4ezc.png" /></figure><p><strong>“<em>Eh vabbe’ ma qui la catena c’e’ gia’, i blocchi precedenti chi ce li ha messi?</em>”</strong></p><p>Ok, i blocchi precedenti sono stati aggiunti nello stesso modo, tutto è partito da un blocco iniziale creato da Satoshi Nakamoto, l’ideatore della Blockchain e del Bitcoin. Perche’ si e’ fatto chiamare così? Forse era Giapponese o gli piacevano i Giapponesi o aveva mangiato troppo sushi la sera prima… non lo sapremo mai!</p><p>I computer che inseriscono i nuovi blocchi nella catena si chiamano Miner, ovvero minatori. Si chiamano così perché ogni volta che aggiungono un blocco gli viene riconosciuto un premio dal blocco che hanno scoperto, il premio e’ in Bitcoin e si chiama Block Reward .</p><p><strong>“<em>Ma se ogni computer prova ad aggiungere nuovi blocchi, come si fa a sapere chi aggiunge alla catena il blocco successivo e si prende il Block Reward?</em>”</strong></p><p>Assegnando ai computer un compito di matematica. Il primo che risolve il compito può mettere il blocco successivo alla fine della catena e guadagnare dei Bitcoin. Il compito di matematica e’ molto difficile, e’ un problema che si chiama Hash, e proprio la sua difficoltà permette di evitare che ci siano imbrogli.</p><p>Il primo Miner che risolve il problema lo da ai propri compagni (gli altri Miner della rete) che possono verificare che il problema sia stato risolto in maniera corretta. Quando il blocco e’ stato verificato si considera valido e si riparte da capo con l’inserimento di un altro blocco… e così via all’infinito.</p><p><strong>“<em>Ma quindi se voglio fare una transazione, ovvero inviare i Bitcoin, come faccio?</em>”</strong></p><p>Devi avere un software che si chiama Wallet (il Portafoglio) sul tuo computer o sul tuo telefono. In questo Portafoglio hai dei Bitcoin. Per trasferirli devi farti dare l’indirizzo di chi li deve ricevere e scegliere quanti ne vuoi mandare. Così il Portafoglio crea una transazione e la manda ai Miner. Un Miner poi la sceglierà e la metterà in un blocco e quando il blocco verrà validato dagli altri computer della rete i soldi saranno a disposizione del ricevente. Semplice no?</p><p><strong>“<em>Ma allora come li compro i Bitcoin?</em>”</strong></p><p>E’ aspetta Zia, un minuto fa non sapevi cos’era e ora vuoi già giocarti il quinto?</p><p>Non avete capito? Rileggetelo e approfondite l’argomento, anche i migliori non capiscono sempre alla prima: “<em>38 e’ febbre Leonardo”.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPByEeQngUeI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPByEeQngUeI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPByEeQngUeI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/37121b142b88ba5e31a5e8de54063151/href">https://medium.com/media/37121b142b88ba5e31a5e8de54063151/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8db81fbd3fee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build a Bitcoin Sentiment Analysis using Python and Twitter]]></title>
            <link>https://medium.com/analytics-vidhya/how-to-build-a-bitcoin-sentiment-analysis-using-python-and-twitter-beb89e6ce0c8?source=rss-88ee9b55fe9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/beb89e6ce0c8</guid>
            <category><![CDATA[cryptocurrency-investment]]></category>
            <category><![CDATA[twitter-data]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Edoardo Ganetti]]></dc:creator>
            <pubDate>Thu, 19 Nov 2020 09:58:53 GMT</pubDate>
            <atom:updated>2020-11-27T16:49:05.865Z</atom:updated>
            <content:encoded><![CDATA[<p>Sentiment Analysis is a trend now, in fact, there are already several products around that analyse one or more social media to get out the sentiment on a certain financial asset. Some of these models are valid, others less so.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ZSNUPq249HNtp2YeCGBRWQ.png" /></figure><h4>Why creating your own Sentiment Analysis?</h4><p>The point is that in generalist models made by others we usually don’t find the detail we need, and they are also not malleable enough to our needs.</p><p>Since the resources needed to create a Sentiment Analysis are completely free, I thought of creating a short DIY guide, so that everyone can choose how to implement their own analysis and draw inspiration from it.</p><h4>Prerequisites</h4><p>There are some resources you will need to subscribe to and some libraries you will need to install for the Python script to run correctly. Furthermore, the resources that I am going to list below have been installed on a mac, with Python 3.9, so the result may need small tweaks if you use a different machine or environment. In any case, for any obstacles there is always the “Holy Stackoverflow” to come to our aid.</p><ul><li>Python 3 installed with the following libraries:</li><li>Tweepy (pip install tweepy)</li><li>Google Clound Language (pip install — upgrade google-cloud-language)</li><li>Pandas (pip install pandas openpyxl)</li><li>Twitter development subscription and relative Oauth credentials</li><li>Google Cloud subscription and relative Oauth credentials for the NLP library</li></ul><p>Once you’ve installed those libraries you’ll be able to import them in the first part of the code:</p><pre>import tweepy<br>import os<br>from google.cloud import language_v1<br>import pandas as pd</pre><h4>Scraping from Twitter</h4><p>Twitter has a public API that returns tweets based on a search done in JSON format. What we are interested in is having information on Bitcoin so we will do a search on <strong>#Bitcoin</strong> as per the code below. In any case, modifying this script simply by putting another coin or other related hashtags (for example <strong>#BTC</strong>) would allow you to extend or refine the search.</p><p>After changing the access tokens (insert-your-twitter-access-token-here)</p><p>You can modify the search parameters to determine how many tweets to retrieve per search and the maximum number of tweets (respectively tweetsPerQry and maxTweets). I strongly recommend doing some test queries to check the results and see if the tweets are relevant.</p><p>Other changes that can be made to the code are those aimed at refining tweets, for example by eliminating retweets. Have a look at the Tweepy API to understand the available options.</p><p>From here I extract only the text of the tweets and put them in a list (listposts) which will then be processed by Google NLP for the actual analysis.</p><pre>consumer_key = &#39;insert-your-twitter-access-token-here&#39;<br>consumer_secret = &#39;insert-your-twitter-access-token-here&#39;<br>access_token = &#39;insert-your-twitter-access-token-here&#39;<br>access_token_secret = &#39;insert-your-twitter-access-token-here&#39;<br><br>tweetsPerQry = 100<br>maxTweets = 100<br>hashtag = &quot;#Bitcoin&quot;<br><br>authentication = tweepy.OAuthHandler(consumer_key, consumer_secret)<br>authentication.set_access_token(access_token, access_token_secret)<br>api = tweepy.API(authentication, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)<br>maxId = -1<br>tweetCount = 0<br>listposts = []<br>while tweetCount &lt; maxTweets:<br>	if(maxId &lt;= 0):<br>		newTweets = api.search(q=hashtag, count=tweetsPerQry, result_type=&quot;recent&quot;, tweet_mode=&quot;extended&quot;)<br>	else:<br>		newTweets = api.search(q=hashtag, count=tweetsPerQry, max_id=str(maxId - 1), result_type=&quot;recent&quot;, tweet_mode=&quot;extended&quot;)<br><br>if not newTweets:<br>		print(&quot;Tweet Habis&quot;)<br>		break<br>	<br>	for tweet in newTweets:<br>		d={}<br>		d[&quot;text&quot;] = tweet.full_text.encode(&#39;utf-8&#39;)<br>		print (d[&quot;text&quot;])<br>		listposts.append(d)<br>		<br>	tweetCount += len(newTweets)	<br>	maxId = newTweets[-1].id<br>print (listposts)</pre><p>You can find the Twitter scraping script I used here: <a href="https://gist.github.com/DeaVenditama/40ed30cb4bc793ab1764fc3105258d8a"><strong>https://gist.github.com/DeaVenditama/40ed30cb4bc793ab1764fc3105258d8a</strong></a></p><h4>Give the Tweets to Google NLP</h4><p>Google NLP is the library that we are going to use to do the Natural Language Processing of the text we have extracted from Twitter. I chose to try this one because I’ve tried others in the past that didn’t convince me very much. Given that it is quite difficult to understand Sentiment in a few words, I found this Google library to be very elaborate as it offers two measures: <strong>score</strong> and <strong>magnitude</strong>.</p><p>In particular, the <strong>score</strong> corresponds to the overall emotional leaning of the text, which can be Positive, Negative or Neutral and has a value that can vary from -1 to 1 (-1 indicates a negative, 0 neutral and 1 positive).<br>The <strong>magnitude</strong> instead indicates the strength of the score. In other words, the strength of the emotion. Values ​​tending to 0 reveal a low strength, while values ​​tending to 2 are indicators of a high emotion strength.</p><p>Before launching the script, you need to have a Google Cloud account and follow the steps at this URL (<a href="https://cloud.google.com/natural-language/docs/reference/libraries#cloud-console">https://cloud.google.com/natural-language/docs/reference/libraries#cloud-console</a>) to install the necessary libraries and download the JSON file that contains the credentials for authentication. Once you have downloaded the file on your machine you will have to put the complete PATH of your file in place of (insert-the-path-to-your-json-key-here)</p><p>In this part of the code we do nothing but scroll the list with the tweets obtained before and call the Google NLP function that analyses the Sentiment, returning a pair of values ​​for each tweet (<strong>score</strong>, <strong>magnitude</strong>).</p><pre>os.environ[&#39;GOOGLE_APPLICATION_CREDENTIALS&#39;] = &quot;insert-the-path-to-your-json-key-here&quot;<br>client = language_v1.LanguageServiceClient()<br><br>for x in range (len(listposts)):<br>     <br>    try:<br> <br>        document = language_v1.Document(content=listposts[x][&quot;text&quot;], type_=language_v1.Document.Type.PLAIN_TEXT)<br>        sentiment = client.analyze_sentiment(document=document).document_sentiment<br>        sscore = round(sentiment.score,4)<br>        smag = round(sentiment.magnitude,4)<br> <br>        listposts[x][&quot;score&quot;] = sscore<br>        listposts[x][&quot;magnitude&quot;] = smag<br>         <br>    except Exception as e:<br>        print(e)<br>        listposts[x][&quot;score&quot;] = 0<br>        listposts[x][&quot;magnitude&quot;] = 0</pre><p>The Google NLP script was provided to me by Daniel Heredia. On this page you can also find a generic example of analysis starting from Facebook posts.</p><p><a href="https://www.danielherediamejias.com/facebook-scraping-and-sentiment-analysis-with-python/">Facebook Scraping and Sentiment Analysis with Python - Daniel Heredia</a></p><h4>Analysis of results on Excel file</h4><p>In the last two lines, the list of tweets with their scores and magnitudes are processed thanks to the Pandas library and written to an excel file of your choice (insert-you-file-excel-path-here)</p><pre>df = pd.DataFrame(listposts)</pre><pre>df.to_excel(&#39;insert-you-file-excel-path-here&#39;, header=True, index=False)</pre><p>When the script has finished running you will have an excel file similar to the one in the figure below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*0h2N0oBzBrvSZKUErjNhhQ.png" /></figure><p>The results show that a subsequent refinement of the extracted tweets is necessary, as it is easy to run into tweets that are not very relevant or, even worse, promotional. I believe the final value of this analysis is as accurate as refinement work that is done in advance.</p><p>In my case, out of 100 tweets the average score was -0.025 for a magnitude of 0.0517.</p><h4>Next developments</h4><p>There are a number of actions that can increase the value of this type of analysis in addition to tweets refinement, for example:</p><ul><li>Extract the Bitcoin values ​​(most exchanges have free APIs) and correlate them with the score.</li><li>Use different searches by trying different hashtags</li><li>Use a smaller cryptocurrency, with a less populated hashtag on Twitter, to understand if the outcome can be more accurate ​​as it is less spammed</li><li>Understanding which timeframes are correct. In our example we’re taking the more recent Tweets. But in theory Sentiment could correlate very well in the short term and less in the long term, or the opposite.</li><li>Adding different metrics from the tweets: number of retweets, likes, etc… that can contribute to weighting or filtering tweets.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=beb89e6ce0c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/how-to-build-a-bitcoin-sentiment-analysis-using-python-and-twitter-beb89e6ce0c8">How to build a Bitcoin Sentiment Analysis using Python and Twitter</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 reasons that will push Bitcoin above $20,000]]></title>
            <link>https://ganetti.medium.com/5-reasons-that-will-push-bitcoin-above-20-000-18b970da9d39?source=rss-88ee9b55fe9f------2</link>
            <guid isPermaLink="false">https://medium.com/p/18b970da9d39</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[btcusd]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[btc]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Edoardo Ganetti]]></dc:creator>
            <pubDate>Thu, 12 Nov 2020 10:12:44 GMT</pubDate>
            <atom:updated>2020-11-12T10:12:44.062Z</atom:updated>
            <content:encoded><![CDATA[<p>Bitcoin is continuing to rise in price over the past few hours and, after breaking through the $ 13800 resistance, it started a run that doesn’t seem to stop. In the last few hoursBTC hit a record high of $ 15,965 and it doesn’t seem to stop. This is a level which had not been reached for 3 years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sn0DRHgIXg9aPL2FgctoNg.png" /></figure><p>The historic cryptocurrency, which recently celebrated 12 years of life, is therefore close to its all-time high set during the December 2017 speculation: $ 19,798 and could finally reach and surpass $ 20,000.</p><p><strong>But what are the reasons why Bitcoin could break the record barrier of $ 20,000?</strong></p><ol><li><strong>Online payment multinationals are joining the Bitcoin ecosystem</strong>. After Square’s 50M USD investment, also another online payment giant like Paypal recently announced plans to use Bitcoin as one of its currencies for online payments. This obviously has enormous repercussions for the entire crypto-sphere, as it not only legitimises Bitcoin as an online payment system, but will significantly increase its customer base and lead it to compete with the trading volumes between traditional currencies.</li><li><strong>Traditional finance is opening its doors to BTC</strong>. If during the latest Bitcoin bull run, the CEO of JP Morgan had defined this cryptocurrency as a “fraud”, recently a team of analysts from the same business bank revised their forecasts in full, suggesting that Bitcoin could easily double or triple its current value thanks to the trust of young investors who prefer it to gold as a safe heaven. This renewed focus of big investors is reflected in the volume of Bitcoin futures transactions. In fact if you sum up CME and Bakkt futures you end up with more than a billion dollars in daily trading. This means that even the money of banks and investment funds is finally arriving with some consistency in cryptocurrencies.</li><li><strong>Technical resistances around the $ 13,800 price area fell</strong>. Perception of Bitcoin value is changing. For this to happen, it was necessary to overcome the negative sentiment of those who had taken part in the last bull run of 2017 and who had been burned by it. The funnel placed in the area between $ 11,000 and $ 14,000 represented for months the last obstacle to a resumption of the upward trend. Since BTC break it out the price has instantly risen by 10% just to underline that there were no more obstacles to hold back the rise towards the previous All Time High.</li><li><strong>The halving of the four-year economic cycles.</strong> Not everyone knows yet that the distribution of Bitcoins, or the rate at which they are created, is not linear. New Bitcoins are created every 10 minutes, but every 4 years the number of Bitcoins created halves. For example, if at the beginning 50 BTC were created for each block (every 10 minutes as we said), after 4 years they decreased to 25, and then reached 12.5 and recently 6.25. The last halving took place in July 2020. The dynamics of Bitcoin price have usually followed these events creating strong upward trends which took place in conjunction with (or in the months following) the halving as can be seen from the graph underlying of Coin Metrics.</li><li><strong>The monetary base is constantly growing while Bitcoin is scarce</strong>. Last but not least it’s the pivotal factor for which Bitcoin has been appreciating in the value since its inception: scarcity. Unlike traditional currencies (or FIAT), BTC has a maximum number of tokens that can be distributed: 21 million. While on the other hand traditional currencies such as Dollar, Euro, etc… are distributed in an inflationary way through the Quantitative Easing process. The inflationary nature of the current economic model only favours the appreciation of the scarcer resources. It is no coincidence that gold is constantly adjusting its highs in this period. In the long term, this will lead Bitcoin to increase even more the interest of savers, and consequently its value.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*33f2b94ccoxrx_cTYtANYg.jpeg" /><figcaption>4. Bitcoin Halving and Price Correlation from Coin Metrics.</figcaption></figure><p>Will these factors be enough to push Bitcoin above $ 20,000? Nothing is certain but I believe odds are in its favour.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18b970da9d39" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>