<?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 Quiver Quantitative on Medium]]></title>
        <description><![CDATA[Stories by Quiver Quantitative on Medium]]></description>
        <link>https://medium.com/@quiverquant?source=rss-84a9589fcafd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a956rXe8I_byQ-WKMrYK7w.jpeg</url>
            <title>Stories by Quiver Quantitative on Medium</title>
            <link>https://medium.com/@quiverquant?source=rss-84a9589fcafd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:10:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@quiverquant/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[Quiver Quant’s Corporate Insider Model]]></title>
            <link>https://quiverquant.medium.com/quiver-quants-corporate-insider-model-752382b9dfd?source=rss-84a9589fcafd------2</link>
            <guid isPermaLink="false">https://medium.com/p/752382b9dfd</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[quant]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[white-papers]]></category>
            <category><![CDATA[trading]]></category>
            <dc:creator><![CDATA[Quiver Quantitative]]></dc:creator>
            <pubDate>Mon, 24 Apr 2023 19:42:38 GMT</pubDate>
            <atom:updated>2023-04-24T19:42:38.511Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Brief Summary</h4><p>The Quiver Quantitative insider transaction model utilizes a combination of both past academic and industry research to estimate which corporate insider trades are more predictive than others. Not all trades are created equal, and previous research suggests that investors can earn excess returns by being selective in the trades they consider following. For instance, a board member buying a fixed amount of stock every month is likely less indicative than a CFO with a positive track record doubling his prior position. There is valuable information embedded in the trades in identifying potential investment opportunities.</p><h4>Why Use Insider Purchases</h4><p>The SEC Form 4 filings used in this project encompass various types of transactions, such as equity and option grants, payment of tax liabilities, and others. Our research, in line with prior academic studies, indicates that open-market insider purchases are the most informative of these transactions, with insider sales ranking second in predictive power. As such, for the initial phase of our model, we chose to focus solely on insider purchases.</p><p>Insider purchases are relatively less noisy than sales, which could be due to several reasons. Firstly, insiders often receive a significant portion of their compensation in the form of equity or options, leading to a higher rate of selling than buying. Additionally, an insider buying their own company’s shares carries a lower litigation risk than selling them. Insiders are also well-informed about their company’s growth prospects and may often purchase their company’s stock during periods when they believe the market is undervaluing it.</p><h4>Data Adjustments</h4><p>To ensure the accuracy and validity of the model, we impose several criteria which purposefully impact the samples. Stocks must have at least six months of prior return data, as well as at least one quarter of fundamental data(earnings, dividends, etc) available from one of our data providers. Insiders must also have at least one previously graded trade to be included in the sample. Potentially due to the adjustments above, the sample for the Health Care sector was volatile and right skewed in terms of returns and resulted in decreased in model accuracy for other sectors. As a result, Health Care was excluded from the sample and subsequent scoring. To prevent overfitting to insiders who trade frequently and to avoid being biased towards their company’s characteristics, we only use one purchase per insider per month to fit the model. Finally, insiders who are not associated with the company in any other way, except for having a large equity stake(10% or more owners), are excluded from the model. By applying these criteria, we can improve the reliability and accuracy of the model.</p><h4>Factors Used in Final Model</h4><p>Here is a bullet point list of all the factors derived from the insider data used in the final model along with a brief description of each.</p><ul><li><strong>Trade Value</strong> — The log of the dollar amount purchased. Higher valued trades have a higher probability of being an informative trade.</li><li><strong>Consensus</strong> — Multiple purchases in the same direction show that insiders are aligned and is correlated with the informativeness of an insider trade. We measure this by taking the net number of unique insiders that have purchased, that is the number of insiders that have bought the stock minus the number of insiders that have sold the stock over the last 90 days.</li><li><strong>Historical Trade Performance</strong> — Previous trades by insiders are ranked based on the subsequent performance of the stock after both buys and sells. Trades from insiders that have historically timed their trades well are generally more informative.</li><li><strong>Insider Trading Frequency</strong> — Counts the number of transactions of a given insider over the past 24 months. Trades from insiders that trade frequently are generally less informative.</li><li><strong>Holdings Ratio</strong> — The increase in an insider’s position in the stock. Higher relative increases in an insider’s position are associated with a greater probability of the relevance of a trade.</li><li><strong>Insider Level</strong> — Top executives that are more involved with day-to-day company activity may possess greater information about their companies’ growth prospects. We observe that higher level insiders, that may possess more valuable information pertaining to the business, exhibit higher excess returns following their purchases. We group insiders into three classes corresponding to corporate hierarchy and its roles in day-to-day operations as well as a non-mutually exclusive flag for the insider working in a finance-related role.</li><li><strong>Momentum</strong> — Insiders are generally contrarian investors and will sometimes purchase their own company’s stock following recent stock underperformance that they may feel is unjustified. We use the t-statistic of a trend line fitted to the last six months of price history to measure a stock’s momentum, adjusted for volatility. We then adjust for the momentum of their respective sector benchmark to net out the effects of overall market rallies and downturns. We find that momentum has a negative correlation to the information of a trade and is one of the most important variables. That is, insider purchases following a period of downward momentum generally have a higher likelihood of being informative.</li><li><strong>Price-To-Book Ratio</strong> — Insiders are generally value investors and may buy when they believe their company’s stock is at a discount. These values are binned by percentiles and are observed to have a negative correlation, meaning insider transactions in value stocks generally are more informative compared to those in growth stocks.</li><li><strong>Company Size</strong> — Size is measured as market cap adjusted to S&amp;P at the time of the filing so as to adjust for market fluctuations. Trades by insiders in smaller companies generally perform better than those made in larger companies. This may be due to smaller companies having less analyst coverage, thus increasing the information asymmetry between insiders and public markets.</li><li><strong>Sector</strong> — The sector of a company is an informative indicator, as information asymmetry and subsequent volatility resulting from the coverage of that information can vary by sector.</li></ul><h4>Construction of the Model and Subsequent Performance</h4><p>A logistic model was used to predict the probability that a given trade is significant. The output of the scoring model is the probability that the trade will deliver strong excess returns in the next one to two months. Parameters were selected based on the fit during the 2009–2016 period. To score purchases made each year, a rolling seven-year historical period is employed to model each year. For example, trades reported in 2018 will be modeled using trades reported from 2011–2017. Therefore, the significance of variables will vary over time. The model can generally identify the highest performing trades in the top predicted relevance scores, which we call conviction.</p><p><em>Exhibit 1: </em>Here you can see<em> </em>that higher conviction trades outperform by producing superior excess returns one month after the filing date, in terms of both the mean and median. We should expect the return distribution to have a large positive skew due to abnormally large price increases observed in a portion of the sample. This skew is more apparent in the two-month view, where median returns suffer while mean returns increase in higher conviction trades. The difference in the distribution between the one- and two-month views may be partly due to the two-month view having more observations where an earnings release has taken place, as many high-level executives have a blackout period before earnings releases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47mROtBlEaoub67wmO1c9g.png" /></figure><p><em>Exhibit 2:</em> To highlight the performance of the scores, we created equal weighted portfolios and grouped them into four groups based on the level of conviction. Each portfolio is constructed by taking an equal weighted position in every stock that had a trade with a qualifying score in the previous 60 days. The highest conviction group outperformed the other groups for most of the period. However, it is important to note that the highest conviction group underperformed during recent market turbulence in 2022.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UoHU7gVXM7fl-tD8nMo9pw.png" /></figure><h4>Methodology for a Strategy</h4><p>The strategy assigns a value to each company based on the number of trades ranked 9 and 10(10 is weighted heavier) over the past 60 days. The value of each trade will decay during this window, with trades reported over 30 days ago weighted half what they are in the first 30 days. Up to 10 stocks are selected based on this aggregation and equal weighting. The strategy is rebalanced at the start of every week as opposed to daily in effort to increase the ease for users who choose to follow the strategy and to minimize the associated trading costs. The performance of this strategy from 2014–01–01 to 2023–04–20 is shown in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JZNOT-WTfWkhTrJ8lDLPbg.png" /></figure><h4>A Few Final Words and Notable Trades Made by the Strategy</h4><p>To highlight the potential of using a model to decipher the relevance of insider purchases, a few selected examples are presented. Some of the examples show the negatives of employing a simple execution strategy, leaving room for improvement for potential future strategies. You can also check out the strategy for yourself at this link <a href="https://www.quiverquant.com/strategies/s/Insider%20Purchases/">here</a> or visit our <a href="https://www.quiverquant.com/insiders/">insider trading dashboard</a> to see the full dataset we used for this project.</p><p><strong>New Age Beverages Corp ($NBEV)<em> — </em></strong>A company involved in the developing, marketing, selling, and distributing of food and beverage products, announced it would be unveiling its portfolio of CBD-infused products in September 2018. The month prior, there were five unique insiders that purchased shares of $NBEV. Four of these five purchases were scored as 10s by our model. Those four trades comprised of 1.5 million shares at ~$1.50/share. The purchases were large relative to their previous holdings, three of the trades were larger than the insider’s original position. Aligned with all other cannabis-related news during this time, the market reacted very positively to the news, with the stock briefly peaking at $10/share. The strategy captured the upswing in price and was able to realize profits by rebalancing weekly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1amRHVmHoFjaSid21fQuUg.png" /></figure><p><strong>Ryerson Holding Corp ($RYI) — </strong>In March 2016, amid a back-and-forth tariff quarrel with China, four unique insiders purchased shares of $RYI, an industrial metals company. These trades came from the President/CEO, the CFO, and two regional presidents. Our model scored three of the trades 10s and the fourth a 9. U.S. steel stocks promptly surged after the U.S. announced it was greatly increasing tariffs on the import of Chinese steel amid accusations of Chinese companies dumping supply to win market share. This example highlights how high-level insiders can have a solid grasp of the environment in which they operate, including pending government action. The strategy bought before the massive surge in steel equities and held though a large part of the rally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bf9jpWS4S2oxwMSfN4MAQ.png" /></figure><p><strong>Eastman Kodak Company ($KODK) — </strong>News emerged on 2020–07–28 that Kodak, a provider of commercial printing, advanced materials, and chemicals, had secured a $765 million government loan to undertake the production of ingredients for generic pharmaceuticals including hydroxychloroquine, a drug that has previously been used to treat malaria and that President Trump suggested could be effective in treating COVID-19. The stock surged as much as 900% before quickly retracing to levels still above the stock price prior to the news. Before the story broke, three insiders bought $KODK, including the CFO and the executive chairman. These trades were scored 10s by our model. Despite this, the strategy just barely missed the surge in price and caught a falling knife due to unfortunate timing. The strategy sold its initial position the day before the news broke due to the prevalence of insider buying in other stocks before entering again due to the “expiring” buy signals from other stocks, resulting in one of the largest losses for the strategy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVeWUvBKoXH9vxAmniOVyw.png" /></figure><p><strong>Infrastructure and Energy Alternatives Inc ($IEA) — </strong>IEA, a company that engages in providing engineering, procurement, and construction services for renewable energy, traditional power, and civil infrastructure industries, announced on 2019–08–02 that it had won a large wind energy project award. The president/CEO and CFO both purchased shares two weeks prior to the announcement, both scored as a 10 by our model. The strategy was able to realize a sizeable profit, closing its position at levels 61% higher than its entry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qdS0JKY6-gXUzctqSCLEkQ.png" /></figure><p><strong>Iveda Solutions ($IVDA) — </strong>IVDA, a small technology company specializing in remote video monitoring services announced a new deal with organizations and municipalities across Taiwan on 2023–02–01, propelling the stock upwards. A director in the company bought shares at the end of 2022, with our model scoring his trade a 10. The trade was exited right before the news broke but was able to capture the unusual price increase days before the news was announced. The stock returned 59% during the period the trade was active.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogE3sVfsBLrnRDdPJ46zHg.png" /></figure><p>The scoring of this trade is interesting given that trades from directors, who usually are not involved in day-to-day operations, are rarely scored highly in the model. The model was heavily influenced by this insider’s previous open-market trading history, which consisted of a single trade disclosed 2021–09–27. Following his 2021 trading disclosure, $IVDA launched a new 4G body camera featuring live-streaming and AI capabilities including face and license plate recognition to be sold to law enforcement and military. The stock peaked at a 194% gain before quickly retracing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=752382b9dfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trading using r/Cryptocurrency mentions data]]></title>
            <link>https://quiverquant.medium.com/trading-using-r-cryptocurrency-mentions-data-313cb9825cab?source=rss-84a9589fcafd------2</link>
            <guid isPermaLink="false">https://medium.com/p/313cb9825cab</guid>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[stock-market]]></category>
            <dc:creator><![CDATA[Quiver Quantitative]]></dc:creator>
            <pubDate>Thu, 17 Jun 2021 14:29:36 GMT</pubDate>
            <atom:updated>2021-06-17T17:44:30.201Z</atom:updated>
            <content:encoded><![CDATA[<p>As <a href="https://www.quiverquant.com/">Quiver Quantitative</a> expands its <a href="http://quiverquant.com/crypto/">cryptocurrency metrics</a>, we can begin to build and backtest trading strategies derived from this data. Using information from Reddit’s Cryptocurrency forum we can design a relatively simple algorithmic trading approach. The code that follows will provide a rough outline of this strategy as well as provide some framework with which one could use to build more complex systems. The goal here will not necessarily be to generate alpha, but rather to showcase a simple use case for the r/CryptoCurrency discussion data.</p><h3><strong>The Strategy</strong></h3><p>1. We begin by using the Quiver API to access data from the Cryptocurrency subreddit.</p><p>2. Identify the five most mentioned cryptocurrencies or tokens per week.</p><p>3. Size your portfolio using the cryptocurrencies/tokens mentions in proportion to each other. Buy at the start of the trading week and sell end of week.</p><p>4. Repeat.</p><h3>Preparation</h3><p>Like I mentioned before, we should begin by accessing our data. In this particular case I used the quiverquant package in Python. In order to work efficiently, we should properly group our data in a format conducive to our strategy. The code you see here provides us approximately 18 months’ worth of ‘Mentions’ data.</p><pre>import pandas as pd<br>import quiverquant<br>#Replace &quot;token&quot; with your own personal token<br>quiver = quiverquant.quiver(&quot;token&quot;)<br>enddate = pd.to_datetime(&quot;now&quot;)<br>startdate = pd.to_datetime(&quot;now&quot;)-pd.Timedelta(days=30)</pre><pre>started = False<br>while startdate &gt;= pd.to_datetime(&quot;2020-01-01&quot;):<br>    df = quiver.cryptoCommentsHistorical(date_from=startdate.strftime(&#39;%Y%m%d&#39;), date_to=enddate.strftime(&#39;%Y%m%d&#39;))<br>    enddate = startdate<br>    startdate = startdate-pd.Timedelta(days=30)<br>    if not started:<br>        combined = df<br>        started = True<br>    else:<br>        combined = pd.concat([combined, df])</pre><p>Now we can generate a Pandas Dataframe and with a few simple lines of code this data can be grouped into total mentions per week by ticker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*bnuni33jif9CffoeRZ5R5Q.jpeg" /></figure><pre>#convert Datetime to Y-M-D, (no time)<br>import datetime as dt<br>combined[&#39;Date&#39;] = combined[&#39;Datetime&#39;].dt.date</pre><pre># Generates number of comments mentioning a specific cryptocurrency each day<br>daily = combined.groupby([&quot;Ticker&quot;,&quot;Date&quot;]).count().reset_index()<br>daily = daily[[&quot;Ticker&quot;, &quot;Date&quot;, &quot;Yolos&quot;]]<br>daily[&quot;Date&quot;] = pd.to_datetime(daily[&quot;Date&quot;])</pre><pre># Groups mentions per day for total mentions of each crypto currency by week<br>weekly = daily.groupby([pd.Grouper(key=&#39;Date&#39;, freq=&#39;W-MON&#39;), <br>&#39;Ticker&#39;])[&#39;Yolos&#39;].sum().reset_index().sort_values(&#39;Date&#39;)</pre><pre>weekly[&#39;Mentions&#39;] = weekly[&#39;Yolos&#39;]<br>weekly = weekly[[&#39;Date&#39;, &#39;Ticker&#39;,&#39;Mentions&#39;]]<br>weekly = weekly.sort_values(&#39;Mentions, ascending = False)</pre><p>With these variables defined we can move on to backtesting our strategy.</p><h3>Backtesting</h3><p>I’m not going to go into too much depth on this block of code, because I expect that most of you will be more interested in building your own strategies rather than copying the one that I show here.</p><pre>#Backtesting...<br>import yfinance as yf<br>dfLarge = weekly[weekly[&quot;Mentions&quot;]&gt;1]<br>dfLarge = dfLarge.sort_values(&quot;Date&quot;, ascending=True)<br>dates = dfLarge[&quot;Date&quot;].unique()</pre><pre>#Initial capital of mock portfolio<br>capital = 100000</pre><pre>started = False<br>startedDFW = False</pre><pre>for date in dates[:-1]:<br>    dfW = dfLarge[dfLarge[&#39;Date&#39;]==date]<br>    dfW = dfW.sort_values(&#39;Mentions&#39;, ascending=False).head(5)</pre><pre>dfW[&#39;prop&#39;] = dfW[&#39;Mentions&#39;]/dfW[&quot;Mentions&quot;].sum()<br>    dfW[&#39;buy&#39;] = capital*dfW[&#39;prop&#39;]<br>    buyDate = date+pd.Timedelta(days=6)<br>    dfW[&#39;buyDate&#39;] = [buyDate]*len(dfW[&#39;buy&#39;])<br>    if not startedDFW:<br>        dfWs = dfW<br>        startedDFW = True<br>    else:<br>        dfWs = pd.concat([dfWs, dfW])<br>    sellDate = date+pd.Timedelta(days=15)<br>    startedWeek = False<br>    print(date)<br>    for index, row in dfW.iterrows():<br>        ticker = row[&quot;Ticker&quot;]<br>        ticker = ticker+&quot;-USD&quot;<br>        print(ticker)<br>        try:<br>            ytStock = yf.download(ticker, start=str(buyDate.date()), end=str(sellDate.date()), interval=&quot;1d&quot;).reset_index()<br>            shares = row[&quot;buy&quot;]/ytStock[&quot;Adj Close&quot;].values[0]<br>            ytStock = ytStock.iloc[1:]<br>            ytStock = ytStock.head(7)<br>        except:<br>            print(&quot;Error&quot;)<br>            ytStock = yf.download(&quot;BTC-USD&quot;, start=str(buyDate.date()), end=str(sellDate.date()), interval=&quot;1d&quot;).reset_index()<br>            shares = row[&quot;buy&quot;]/ytStock[&quot;Adj Close&quot;].values[0]<br>            ytStock = ytStock.iloc[1:]<br>            ytStock = ytStock.head(7)</pre><pre>sDates = list(ytStock[&quot;Date&quot;].values)<br>            ytStock = ytStock[ytStock[&quot;Date&quot;].isin(sDates[:5]+sDates[7:])]<br>            ytStock = ytStock.head(5)<br>        ytStock[&quot;OpenAmount&quot;] = ytStock[&quot;Open&quot;]*shares<br>        ytStock[&quot;CloseAmount&quot;] = ytStock[&quot;Adj Close&quot;]*shares<br>        ytStock[&quot;Ticker&quot;] = [ticker]*len(ytStock[&quot;OpenAmount&quot;])<br>        ytStock = ytStock.fillna(method=&#39;ffill&#39;)<br>        ytStock = ytStock.fillna(method=&#39;bfill&#39;)<br>        ytStock = ytStock.dropna()<br>        if not startedWeek:<br>            dfCombined = ytStock<br>            startedWeek = True<br>        else:<br>            dfCombined = pd.concat([dfCombined, ytStock])<br>        <br>        if not started:<br>            dfAll = ytStock<br>            started = True<br>        else:<br>            dfAll = pd.concat([dfAll, ytStock])<br>            <br>    capital = 0<br>    for ticker in dfCombined[&quot;Ticker&quot;].unique():<br>        dfT = dfCombined[dfCombined[&quot;Ticker&quot;]==ticker]<br>        capital+=dfT[&quot;CloseAmount&quot;].values[-1]<br>    print(&quot;Week end capital: &quot;, capital)</pre><h3><strong>Visuals</strong></h3><p>We also want to get a sense of how this strategy performs against alternative portfolios. In the past we have used the market as a benchmark, but in this case it seemed like the best measure might be to simply compare the performance of the mock portfolio against the performance of a few large cap cryptocurrencies.</p><p>You can see in the graph below the performance of the r/Cryptocurrency fund and also some other cryptocurrencies. Along with this I will also get historical data on the cryptocurrencies I am comparing our portfolio to.</p><pre>import plotly.graph_objects as go<br>dfDay = dfAll.groupby(&quot;Date&quot;).sum().reset_index()<br>dfDay[&quot;Fund&quot;] = [&quot;r/Crypto&quot;]*len(dfDay[&quot;Close&quot;])</pre><pre>#Remove dates<br>dfDay = dfDay[~dfDay[&quot;Date&quot;].isin([ &quot;2020-04-20&quot;,&quot;2020-10-19&quot;,&quot;2020-10-20&quot;])]</pre><pre>#Visual<br>import plotly.express as px<br>import plotly<br>fig = go.Figure(data=go.Scatter(x=dfDay[&quot;Date&quot;], y=dfDay[&quot;CloseAmount&quot;], line=dict(width=1.5),marker=dict(color=&quot;rgb(229, 81, 39)&quot;), name=&quot;r/Crypto&quot;))<br>coins = [&quot;BTC&quot;, &quot;XRP&quot;, &#39;LTC&#39;]<br>colors = [&quot;red&quot;, &#39;blue&#39;, &#39;green&#39;]<br>for i in range(0, len(coins)):<br>    coin = coins[i]<br>    color = colors[i]<br>    dfCoin = yf.download(coin+&quot;-USD&quot;, start=&quot;2020-01-27&quot;, end=&quot;2021-06-8&quot;, interval=&quot;1d&quot;).reset_index()<br>    dfCoin[&quot;Fund&quot;] = [coin] * len(dfCoin[&quot;Open&quot;])<br>    shares = 100000/dfCoin[&quot;Open&quot;].values[0]<br>    dfCoin[&quot;OpenAmount&quot;] = dfCoin[&quot;Open&quot;]*shares<br>    dfCoin[&quot;CloseAmount&quot;] = dfCoin[&quot;Close&quot;]*shares<br>    fig.add_trace(go.Scatter(x=dfCoin[&quot;Date&quot;], y=dfCoin[&quot;CloseAmount&quot;], line = dict(width=1.5),marker=dict(color=color, opacity=.1), name=coin))</pre><pre>rCryptoReturn = (capital-100000)/100000*100<br>fig.update_layout(title=&quot;&lt;b&gt;+&quot;+str(round(rCryptoReturn, 2))+&quot;% Return&lt;/b&gt;&lt;br&gt;January 2020 - Feb 2021&quot;, titlefont=dict(color=&#39;rgb(229, 81, 39)&#39;, size=20), plot_bgcolor=&#39;rgb(32,36,44)&#39;, paper_bgcolor=&#39;rgb(32,36,44)&#39;)<br>fig.update_xaxes(title_text=&quot;&quot;,color=&#39;white&#39;, showgrid=False, tickfont=dict(size=10))<br>fig.update_yaxes(title_text=&quot;$&quot;, color=&#39;white&#39;, showgrid=False, titlefont=dict(size=20),gridcolor=&quot;rgb(228,49,34)&quot;)<br>fig.update_layout(<br>    legend=dict(<br>        title=dict(text=&quot;&quot;,font=dict(color=&#39;white&#39;)),<br>        x=.85, y=1.15,<br>        font=dict(<br>            color=&#39;white&#39;,<br>            size=15<br>        )<br>    )<br>)</pre><pre>fig.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VAOu-cIfZr8U6ZV_g79y5Q.png" /></figure><p>We can also generate a bar graph depicting the weekly composition of the portfolio.</p><pre>import plotly.express as px<br>import plotly<br>fig = px.bar(dfWs, x=&quot;buyDate&quot;, y=&quot;buy&quot;, color=&#39;Ticker&#39;,text=&#39;Ticker&#39;,color_discrete_sequence=px.colors.qualitative.Light24)<br>fig.update_layout(title=&quot;Portfolio by Week&quot;, titlefont=dict(color=&#39;rgb(228,49,34)&#39;), plot_bgcolor=&#39;rgb(32,36,44)&#39;, paper_bgcolor=&#39;rgb(32,36,44)&#39;)<br>fig.update_xaxes(title_text=&quot;&quot;,color=&#39;white&#39;, showgrid=False, fixedrange=False)<br>fig.update_yaxes(title_text=&quot;$&quot;,color=&#39;white&#39;, showgrid=False,  fixedrange=False,gridwidth=1,gridcolor=&quot;rgb(109,177,174)&quot;)<br>fig.update_layout(<br>    legend=dict(<br>        title=dict(text=&quot;Ticker&quot;,font=dict(color=&quot;white&quot;)),<br>        <br>        font=dict(<br>            color=&#39;white&#39;<br>        ),<br>        <br>    )<br>)<br>fig.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*R9Sfuk9ey6H6uRvT4hVy3g.png" /></figure><h3>Conclusion</h3><p>While certainly a simple approach, I hope that the code shown here today provides a framework for developing more complex strategies using data on r/CryptoCurrency discussion.</p><p>That being said neither this post nor this strategy should be used as financial advice, or as any indication of future results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=313cb9825cab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>