<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Maksim Bober</title>
    <description>The latest articles on DEV Community by Maksim Bober (@bobrinik).</description>
    <link>https://dev.to/bobrinik</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F409799%2F1c3c093c-38ed-4d57-803c-617a71f5b1c1.jpeg</url>
      <title>DEV Community: Maksim Bober</title>
      <link>https://dev.to/bobrinik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bobrinik"/>
    <language>en</language>
    <item>
      <title>Algorithmic Trading Showdown: Self-Hosting vs. Cloud Hosting - Uncover the Ultimate Winner!</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Thu, 27 Jul 2023 15:31:17 +0000</pubDate>
      <link>https://dev.to/bobrinik/algorithmic-trading-showdown-self-hosting-vs-cloud-hosting-uncover-the-ultimate-winner-4b8n</link>
      <guid>https://dev.to/bobrinik/algorithmic-trading-showdown-self-hosting-vs-cloud-hosting-uncover-the-ultimate-winner-4b8n</guid>
      <description>&lt;p&gt;P.S. Pardon my viral title, I'm trying to test out if viral titles on DEV have an effect on stats (-/+), it might be a separate post later 😄&lt;/p&gt;

&lt;p&gt;Let's face it; you are not exceptional. In all likelihood, you will perform worse than long-term investors. You will trade more often than them, and you will be learning. The bottom line, doing algo-trading, you will lose most of the time. After a couple of years (in the best-case scenario), you might see positive yearly returns in areas where the markets are not efficient. Those inefficiencies will be temporary and will have limited capacity or high risks. If not, Big Corp would already be sucking all alpha out of it.&lt;/p&gt;

&lt;p&gt;Now if you accept the things above and you still want to go into it, the name of your game will be preserving the capital. Cloud costs money and time. Money is pretty obvious. Time is something less so. &lt;/p&gt;

&lt;h2&gt;
  
  
  Money in cloud
&lt;/h2&gt;

&lt;p&gt;The first step, you would need to have OHCL data pulled daily. A higher resolution is better since you can always resample to a lower resolution and not the other way around. At this point, you would probably get a data provider for 1min OHCL, which would cost you anything from 20$-90$ USD per month. For that much money, you would be able to pull daily or the last 30 days of OHCL with 1min resolution. &lt;/p&gt;

&lt;p&gt;You would still have a rate limit. With a rate limit of 300 requests per minute will take you 23 min to pull 7000 stocks or 10 min to pull 3000. Now, how much would it cost you to run an EC2 machine for 23 min a day? &lt;code&gt;(30*23) / 60 * 0.0255 = 0.29325&lt;/code&gt; so it will be  30 cents per month to host this on your EC2 machine given that the EC2 machine runs daily for 23 minutes. This is the cheapest &lt;code&gt;Vcpu: 1&lt;/code&gt;    and &lt;code&gt;2 GiB&lt;/code&gt; machine. Now, you would need to figure out how to provision EC2 machine with your pulling logic and figure out how to trigger it on schedule. So that's extra couple of cents per year. Now, AWS prices are not set in stone and could increase so will your budget. All of this data would need to be written to somewhere cheapest and easiest in EC2 is S3. You would need to read this data onto you machine for analysis which is an extra $+ for you. What if you make a mistake and you need to know that the job has failed? That is another expense +.&lt;/p&gt;

&lt;p&gt;So what costs money for us so far: data vendor + EC2 + S3 + monitoring + management time. I added management time since it's the time that you are not spending working on your trading strategy. Now let's say you have found a strategy that requires data to be scraped from a browser or vendor has to be pulled 8h per day. Now your AWS costs will start growing more than your data vendor costs. There will be a point when the money you spend for your infra will outgrow the possible edge you can find.&lt;/p&gt;

&lt;h3&gt;
  
  
  Now let's talk about self-hosting:
&lt;/h3&gt;

&lt;p&gt;This is also not rosy; it will require a higher starting cost but will be kept flat for far longer than your cloud solution. To get started, you need hardware if you have hardware lying around, this is all fine for you. You can set up a Linux machine with ssh access and deploy your fetcher/strategy. You could set up inexpensive monitoring with Cronitor or Discord bot so that you know when the bot fails. The downsides to this approach are that you need to operate your own server and keep it up and running. In my experience, if you keep your server simple, do not run k8s or docker and just deploy bare metal. It will only fail if there is an electricity outage. It should not be a problem initially since the costs you save will make up for it. If you know Rust or C++ you can compile your fetcher to your hardware. Keep it simple, no abstractions, just fetching and writing to storage. All of your data operations will be done on your main machine using Python during the exploration phase.&lt;/p&gt;

&lt;p&gt;So what costs money for us so far: data vendor + initial hardware. Note, initial hardware and scaling will be the same cost and the more you will run it cheaper it will become.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to move to the cloud?
&lt;/h2&gt;

&lt;p&gt;When you start making more money than you would pay for cloud hosting. Moving to the cloud will not make you money automatically. Unless you rely on the speed of access and you want to position your server as close as possible to the exchange for some HFT stuff.&lt;/p&gt;

&lt;h2&gt;
  
  
  TLDR
&lt;/h2&gt;

&lt;p&gt;In the early stages of algo-trading, you'll face losses; thus, maintaining a cost-effective setup for data handling and processing becomes vital to survival - you should consider transitioning to the cloud only when your trading earnings consistently exceed the costs associated with cloud services.&lt;/p&gt;

</description>
      <category>trade</category>
      <category>algotrade</category>
      <category>cryptocurrency</category>
      <category>cloud</category>
    </item>
    <item>
      <title>How to build openssl when you broke it.</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Wed, 26 Jul 2023 22:55:54 +0000</pubDate>
      <link>https://dev.to/bobrinik/how-to-build-openssl-when-you-broke-it-2k0e</link>
      <guid>https://dev.to/bobrinik/how-to-build-openssl-when-you-broke-it-2k0e</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Step 1: Update your system&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update

&lt;span class="c"&gt;# Step 2: Install required dependencies&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;build-essential

&lt;span class="c"&gt;# Step 3: Download and extract OpenSSL source&lt;/span&gt;
wget https://www.openssl.org/source/openssl-1.1.1l.tar.gz
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xf&lt;/span&gt; openssl-1.1.1l.tar.gz
&lt;span class="nb"&gt;cd &lt;/span&gt;openssl-1.1.1l

&lt;span class="c"&gt;# Step 4: Configure and build OpenSSL&lt;/span&gt;
./config
make
&lt;span class="c"&gt;# Step 5: Test that everything works&lt;/span&gt;
make &lt;span class="nb"&gt;test&lt;/span&gt;

&lt;span class="c"&gt;# Step 6: Install OpenSSL&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;make &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Step 7: Verify the installation&lt;/span&gt;
openssl version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Look into Telegram username auction</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Tue, 14 Feb 2023 16:17:50 +0000</pubDate>
      <link>https://dev.to/bobrinik/look-into-telegram-username-auction-18a0</link>
      <guid>https://dev.to/bobrinik/look-into-telegram-username-auction-18a0</guid>
      <description>&lt;p&gt;Telegram has started an auction on short usernames on the TON blockchain. Here’s a good explanation of the historical context of the TON blockchain. For those who don’t know, initially, TON was developed by Telegram, and there were plans to do ICO, but SEC intervened, and Telegram was forced to “distance” itself from the project, but here we are, and TON is part of the in-app experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--89kddxU---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/872v39318dpo6pesx3fr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--89kddxU---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/872v39318dpo6pesx3fr.png" alt="Image description" width="514" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; You can see the auction here.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s going on with the top 200
&lt;/h2&gt;

&lt;p&gt;There are some outliers that I excluded to be able to plot the majority of auctions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vrFD8TVo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dnbljaod4bx4fmlp76p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vrFD8TVo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dnbljaod4bx4fmlp76p.png" alt="Image description" width="625" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Most of the usernames are being sold between 755$ and 1000$.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If we plot all of the bids on a single line:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FPVbbNtD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16quzjpumg7s22hsa56g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FPVbbNtD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16quzjpumg7s22hsa56g.png" alt="Image description" width="608" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see that some usernames go for up to a million.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WUJ9Q7YU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dre8muwpbih4axfk4y88.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WUJ9Q7YU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dre8muwpbih4axfk4y88.png" alt="Image description" width="880" height="839"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s interesting to see how the most popular usernames are related to existing brands. It’s not surprising, though, if you know the economics of domain name prices. A more accessible and catchier domain name makes it easy to discover/remember your website. Website visits translate into $ pretty quickly.&lt;/p&gt;

&lt;p&gt;Not sure if official brands are buying Telegram usernames or if those are speculators trying to flip a famous brand’s name, or if someone with a lot of TON does it for some other purpose (for fun?).&lt;/p&gt;

&lt;p&gt;The auction has been enough to generate a price movement on TON, although it was much less than in November 2021.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9fQOx6Vq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zglg7ursm9jn551f3j0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9fQOx6Vq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zglg7ursm9jn551f3j0.png" alt="Image description" width="880" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s the bigger picture?
&lt;/h2&gt;

&lt;p&gt;Telegram has 700 million users, and Twitter has 230 million.&lt;/p&gt;

&lt;p&gt;Telegram distills the social network model of FB to the bare minimum, a communication channel between people. Now that it has a vast reach, it monetizes using standard internet practices. It has a payment system supported by TON, sells addresses to companies or individuals, adds facilities to manage large channels, allows the publication of different types of content, and has voice chat … You get the point.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Predicting outcomes of Kentucky Derby 2022 race</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Sat, 07 May 2022 00:05:13 +0000</pubDate>
      <link>https://dev.to/bobrinik/predicting-outcomes-of-kentucky-derby-2022-race-1dbo</link>
      <guid>https://dev.to/bobrinik/predicting-outcomes-of-kentucky-derby-2022-race-1dbo</guid>
      <description>&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;Kentucky Derby is a horse race that takes place each year in Louisville, Kentucky, United States. I learned about this race from one of my coworkers. He has been doing a side project analyzing past races to predict the outcome of the upcoming horse race. I didn't know anything about horse racing and thought it would be fun to do the same project. I would make predictions and see if they are accurate or not. I would also learn a lesson about how to profit in the real world using DS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Predictions
&lt;/h2&gt;

&lt;p&gt;As a result of my analysis I found that two candidates are likely to finish in the top 3.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Horse&lt;/th&gt;
&lt;th&gt;Trainer&lt;/th&gt;
&lt;th&gt;Jockey&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Charge It&lt;/td&gt;
&lt;td&gt;Todd A. Pletcher&lt;/td&gt;
&lt;td&gt;Luis Saez&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Simplification&lt;/td&gt;
&lt;td&gt;Antonio Sano&lt;/td&gt;
&lt;td&gt;Jose Ortiz&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;Mostly because of this.&lt;br&gt;
After running a community detection algorithm on top of the social network of jockey and trainer I found this.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dhmpo5qG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9vu4e0cl515hseiysje.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dhmpo5qG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9vu4e0cl515hseiysje.png" alt="Image description" width="880" height="967"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are clear community clusters in the dataset. After suggestion of my coworker to find out what percentage of the means falls into the cluster it turned out that 50% of all wins that happened from 2015-2021 fall into the red cluster.&lt;/p&gt;

&lt;p&gt;After finding out if there are trainers from this winning cluster participate in the current race I found out that there are 2 trainers participating but they have 4 horses so there are 4 choices to choose from. Then I norrowed down my scope to two by finding out which jockeys have won before (in my notebook you can see why it's reasonable to make such an assumption).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not to use ML?
&lt;/h2&gt;

&lt;p&gt;I'm not sure that this problem is truly "random". I have an intuition that it runs simillar to an old boy network so by doing a community analysis I might get a better shot at getting an edge.&lt;/p&gt;

&lt;p&gt;Why do I think that it's an old boy network? Well, primarily because of Bob Baffert, who has a history of drugging his horses and being disqualified from participating in horse competition until 2023. Coincidently he falls into this red cluster that wins 50% of the time. It might be a coincidence, but knowing about Tour De France scandal and Doping in Olympic games by Russia, I would not be surprised that something like this might exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Outcomes
&lt;/h2&gt;

&lt;p&gt;So the results of the horse race came in, none of my predictions made into the top 3. Simplification came in close but Charge It has came in 8. So the predictions weren't as good as I thought.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finished&lt;/th&gt;
&lt;th&gt;Horse&lt;/th&gt;
&lt;th&gt;Trainer&lt;/th&gt;
&lt;th&gt;Jockey&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;Charge It&lt;/td&gt;
&lt;td&gt;Todd A. Pletcher&lt;/td&gt;
&lt;td&gt;Luis Saez&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Simplification&lt;/td&gt;
&lt;td&gt;Antonio Sano&lt;/td&gt;
&lt;td&gt;Jose Ortiz&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The winners were:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finished&lt;/th&gt;
&lt;th&gt;Horse&lt;/th&gt;
&lt;th&gt;Trainer&lt;/th&gt;
&lt;th&gt;Jockey&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Rich Strike&lt;/td&gt;
&lt;td&gt;Eric Reed&lt;/td&gt;
&lt;td&gt;Sonny Leon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Epicenter&lt;/td&gt;
&lt;td&gt;Steve Asmussen&lt;/td&gt;
&lt;td&gt;Joel Rosario&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Zandon&lt;/td&gt;
&lt;td&gt;Chad C. Brown&lt;/td&gt;
&lt;td&gt;Flavien Prat&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Interesting to see that at least one of the trainers that appeared in our winning cluster has made it into top 3, so we weren't too far out with our analysis after all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.wolframcloud.com/obj/maksim.bober/Published/HorseRacing.nb"&gt;Notebook Exploration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://community.wolfram.com/groups/-/m/t/2526950?p_p_auth=33CaKY0C"&gt;Wolfram Community Post&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>datascience</category>
      <category>wolfram</category>
      <category>betting</category>
    </item>
    <item>
      <title>Temperature, BTC price and crypto farm earnings</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Mon, 21 Feb 2022 03:09:14 +0000</pubDate>
      <link>https://dev.to/bobrinik/temperature-btc-price-and-crypto-farm-earnings-45j9</link>
      <guid>https://dev.to/bobrinik/temperature-btc-price-and-crypto-farm-earnings-45j9</guid>
      <description>&lt;p&gt;I'm following work of &lt;a href="https://www.stephenwolfram.com/"&gt;Stephen Wolfram&lt;/a&gt; and I got excited by his idea of a &lt;a href="https://writings.stephenwolfram.com/2017/11/what-is-a-computational-essay/"&gt;computational essay&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;I'm also into crypto trading, so I'm always looking for ways of creating some alpha over other crypto-traders (speculators 😋). One of the ideas that made intuitive sense to me was to use temperature at locations of crypto-farms to generate a trading signal somehow. Thus, I decided to explore this idea through a computational essay that you can view &lt;a href="https://www.wolframcloud.com/obj/c008c8eb-49fe-4fab-9f49-d12714ff6905"&gt;here&lt;/a&gt;. Sorry, dev.to does not support embeds from Wolfram 😢.&lt;/p&gt;

&lt;p&gt;TLDR:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There appears to be some relationship, at least sometimes. Note, the influence from news (Elon twitting) seems to be influencing crypto much stronger than any of the temperature highs or lows at crypto farm locations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to profit from it (likely loose money fast)? 🤑
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://bit.ly/3H35jHl"&gt;Global Energy Forecast&lt;/a&gt; offers a free API that allows to see Heating Degree Days and Cooling Degree Days for any location in the world. Essentially, it's theoretically possible to use it to forecast energy usage for any location in the world. For example, high HDD might force crypto farmers to go offline since electricity companies prioritize residents. So this might negatively affect BTC price, so you might use &lt;a href="https://support.kraken.com/hc/en-us/articles/203250333-Opening-a-margin-position"&gt;Kraken Short&lt;/a&gt; to try to make money on it (likely loose).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>datascience</category>
      <category>trading</category>
      <category>crypto</category>
      <category>wolfram</category>
    </item>
    <item>
      <title>LeetCode vs Projects (Hedgehog or Fox)</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Mon, 14 Feb 2022 00:06:05 +0000</pubDate>
      <link>https://dev.to/bobrinik/litecode-vs-projects-hedgehod-or-fox-4ffh</link>
      <guid>https://dev.to/bobrinik/litecode-vs-projects-hedgehod-or-fox-4ffh</guid>
      <description>&lt;p&gt;What would you do to get hired, Litecode or work on projects?&lt;/p&gt;

&lt;p&gt;To me, it seems to be the exploitation vs exploration tradeoff. You can specialize and become very good at solving algorithmic challenges. You can even get hired for this in FAANG. &lt;/p&gt;

&lt;p&gt;However, building projects and solving your problems with the software will be more rewarding in the long game. It will teach you the experience needed to build and maintain projects as well as you are going to have an opportunity to make money out of it. 💰 It'll be easier for you to answer technical questions at the interviews since you will talk about challenges you encountered when working on your project.&lt;/p&gt;

&lt;p&gt;As you will be working on your projects, you are likely to run into problems that will require some algorithmic solution. No worries, you will learn how to solve those once you start Googling and researching how to do what you want to do.&lt;/p&gt;

&lt;p&gt;TLDR: Litecode will teach you one thing, working on your own projects will teach you many.&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Lessons learned: Migrating Spark App to AWS EMR</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Fri, 04 Feb 2022 13:53:11 +0000</pubDate>
      <link>https://dev.to/bobrinik/lessons-learnt-migrating-spark-app-to-aws-emr-39in</link>
      <guid>https://dev.to/bobrinik/lessons-learnt-migrating-spark-app-to-aws-emr-39in</guid>
      <description>&lt;p&gt;Some background, the startup that I was working at got acquired, and suddenly all of my programming effort was focused on migrating ML infrastructure to a parent company's infrastructure. I didn't know anything about AWS and EMR at the time, so I had to learn on the job 💪&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/pO7jomKrTwfSw/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/pO7jomKrTwfSw/giphy.gif" alt="Get ready to work" width="425" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So here are my newbie thoughts about AWS EMR good, ugly and bad sides.&lt;/p&gt;

&lt;h3&gt;
  
  
  Good
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Management of Spark cluster is done by AWS, so you can spend time on delivering the value instead of mantaining the cluster. ❤️&lt;/li&gt;
&lt;li&gt;Read/Writes from S3 out of the box. Data input and output can live in S3 which makes it very easy to share data with teamates. ❤️ ❤️ ❤️&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Ugly
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Logs...

&lt;ul&gt;
&lt;li&gt;To get the logs of you application, you would need to jump through bunch of hoops. Live logs of a running application on the cluster? (Very, very tricky todo). 😭😭&lt;/li&gt;
&lt;li&gt;You can get the logs after the application has finished running, by &lt;code&gt;ssh&lt;/code&gt; into EMR master and runing &lt;code&gt;yarn logs --applicationId&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can also wait ~5min and get them from the S3 bucket where EMR saves these logs 😭&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Bad
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Finetuning hole...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Something that you could run with 4 nodes in your own Spark cluster could take 30 nodes with autoscaling in EMR.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;No Spark standalone mode, no nice debugging...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EMR does not support Spark standalone mode. So you would write your PySpark app submit it to EMR cluster as a job. Once it fails, you would need to go through ENORMOUS stack trace of Yarn, Spark and your application to see the error. No more pleasant debugging experience from the comfort of your IDE 😭😭&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Overall, AWS EMR still requires maintenance effort. It's much more involved compared to a simple web app. You would need to understand Spark's inner workings to fine-tune it to get the logs quickly and not bankrupt you in the process with its compute autoscale. (You could disable autoscaling, but then you would need to spend more time tuning your resources)&lt;/p&gt;

</description>
      <category>bigdata</category>
      <category>aws</category>
      <category>spark</category>
      <category>mlops</category>
    </item>
    <item>
      <title>Getting humble bundle books</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Sat, 29 Jan 2022 20:38:05 +0000</pubDate>
      <link>https://dev.to/bobrinik/getting-humble-bundle-books-3ca3</link>
      <guid>https://dev.to/bobrinik/getting-humble-bundle-books-3ca3</guid>
      <description>&lt;p&gt;I have been using &lt;a href="https://www.humblebundle.com/books?hmb_source=navbar"&gt;Humble Bundle Books&lt;/a&gt; for at least three years. However, they still haven't implemented a user-friendly way to download all the books from the order page. They have an option to download all the books, but when you click on it, you will have one popup for each book to download, and you would need to do it multiple times if you want your books in different formats.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/11tTNkNy1SdXGg/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/11tTNkNy1SdXGg/giphy.gif" alt="Very Angry Image" width="500" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I decided to use my ⌨️🐒skillz to come up with a better solution.&lt;/p&gt;

&lt;p&gt;Here I present to you &lt;code&gt;humble_get&lt;/code&gt; a cli tool that would allow you to download all of your Humble Bundle books from the comfort of your terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;humble-get

&lt;span class="c"&gt;# Get YOUR_KEY from humble_bundle page&lt;/span&gt;
&lt;span class="c"&gt;# https://www.humblebundle.com/downloads?key=YOUR_KEY&lt;/span&gt;

&lt;span class="c"&gt;# And get all of your books in a nice directory:&lt;/span&gt;
humble_get &lt;span class="nt"&gt;-key&lt;/span&gt; YOUR_KEY &lt;span class="nt"&gt;-format&lt;/span&gt; epub &lt;span class="nt"&gt;-p&lt;/span&gt; ./my/books/directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Bobrinik"&gt;
        Bobrinik
      &lt;/a&gt; / &lt;a href="https://github.com/Bobrinik/humble_bundle_books"&gt;
        humble_bundle_books
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
CLI for getting your Humble Bundle Books&lt;/h1&gt;
&lt;p&gt;Humble book bundles are hard to download from the order page.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/Bobrinik/humble_bundle_books/master/resources/page.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vMs5BiLP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/Bobrinik/humble_bundle_books/master/resources/page.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you are going to click on the download button you are going to end up with one popup window per book.
Which is a painfull UX to say the least.&lt;/p&gt;
&lt;p&gt;So, I decided to implement a &lt;code&gt;command line app in Python&lt;/code&gt; that would make it easier to download books from the order page
into a directory of my choosing.&lt;/p&gt;
&lt;h2&gt;
Installation&lt;/h2&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;pip install humble-get&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
How to use it?&lt;/h2&gt;
&lt;p&gt;In order to use this script, you would need to have a humble bundle &lt;code&gt;key&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can get it by checking the URL right after buying your bundle.
&lt;a rel="noopener noreferrer" href="https://raw.githubusercontent.com/Bobrinik/humble_bundle_books/master/resources/img.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_f5JEshK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/Bobrinik/humble_bundle_books/master/resources/img.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;https://www.humblebundle.com/downloads&lt;span class="pl-k"&gt;?&lt;/span&gt;key=YOUR_KEY

humble_get -key YOUR_KEY -format epub -p ./my/books/directory
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; OR&lt;/span&gt;
humble_get -key YOUR_KEY -format pdf -p ./my/books/directory
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; OR&lt;/span&gt;
humble_get -key YOUR_KEY -format all -p ./my/books/directory&lt;/pre&gt;

&lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Bobrinik/humble_bundle_books"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



</description>
      <category>humblebundle</category>
      <category>books</category>
      <category>python</category>
    </item>
    <item>
      <title>Kazakhstan and BTC: What would happen to BTC if its hash rate suddenly drops?</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Thu, 06 Jan 2022 03:48:44 +0000</pubDate>
      <link>https://dev.to/bobrinik/what-would-happen-to-btc-if-its-hash-rate-suddenly-drops-4b7l</link>
      <guid>https://dev.to/bobrinik/what-would-happen-to-btc-if-its-hash-rate-suddenly-drops-4b7l</guid>
      <description>&lt;p&gt;On the 5th of January 2022, Kazahstan answered this question. On this day, the Kazakhstan government has increased prices on gas 2x, leading to protests which caused the government &lt;a href="https://blog.cloudflare.com/internet-shut-down-in-kazakhstan-amid-unrest/"&gt;to shutdown Kazakh internet for 7 hours&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;18.10% of the world hash rate is in Kazakhstan, according to &lt;a href="https://ccaf.io/cbeci/mining_map"&gt;https://ccaf.io/cbeci/mining_map&lt;/a&gt;. In other words, 18.10% of the hash rate has vanished from the BTC network.&lt;/p&gt;

&lt;p&gt;VP of Research at &lt;a href="https://www.theblockresearch.com/"&gt;The Block&lt;/a&gt; also found that the drop in hash rate was 12%.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2QEPX_H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/FIWgAPWX0AYPL6I.png" alt="unknown tweet media content"&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--H3ocWF7i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1339205414286716928/ai4P9IKf_normal.jpg" alt="Larry Cermak profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Larry Cermak
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @lawmaster
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ir1kO05j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      Internet has been down in Kazahstan for a few hours where roughly 18% if Bitcoin's hashrate is. &lt;br&gt;&lt;br&gt;Looks like the impact on the hashrate is so far 12% drop just in the last few hours since internet went down. 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      16:23 PM - 05 Jan 2022
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1478764142957846531" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fFnoeFxk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1478764142957846531" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k6dcrOn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1478764142957846531" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRQc9lOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;So we predict that the same number of BTC transactions will go through a smaller number of nodes; thus, BTC transaction fees will go up.&lt;/p&gt;

&lt;p&gt;Let's double-check it with &lt;a href="https://studio.glassnode.com/metrics?a=BTC&amp;amp;category=Miners&amp;amp;chartStyle=column&amp;amp;ema=0&amp;amp;m=fees.VolumeSum&amp;amp;mAvg=0&amp;amp;mMedian=0&amp;amp;s=1635724800&amp;amp;u=1638748799&amp;amp;zoom="&gt;Glassnode data&lt;/a&gt; and indeed the fees have went up.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it affect the BTC price?
&lt;/h2&gt;

&lt;p&gt;Unfortunately, I don't know. BTC prices went down today, but the stock market also fell. It seems unlikely to be related to Kazahstan events and BTC fees. Some say that the fall in BTC and the stock market is related to the US government's announcement of interest rate hikes.&lt;/p&gt;

&lt;p&gt;TLDR: If hashrate disappears, fees go up 🤷&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Getting an edge in a board game (part 0)</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Fri, 31 Dec 2021 23:35:03 +0000</pubDate>
      <link>https://dev.to/bobrinik/calculating-your-chances-in-gremlins-inc-board-game-part-0-4114</link>
      <guid>https://dev.to/bobrinik/calculating-your-chances-in-gremlins-inc-board-game-part-0-4114</guid>
      <description>&lt;p&gt;I'm on vacation, and because of Covid-19 and Omicron variant, I end up spending a lot of time at home. One of my favourite pass times is to play Gremlins Inc with my friends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://store.steampowered.com/app/369990/Gremlins_Inc/"&gt;Gremlins Inc&lt;/a&gt; is a board game available on Windows, macOS and Linux.&lt;/p&gt;

&lt;p&gt;This is how the game looks.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SMv3Fpyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/winnaud7q4qm7ov7wbvr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SMv3Fpyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/winnaud7q4qm7ov7wbvr.png" alt="Description of the game board" width="806" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are three main components at a high level: players, board, and your card deck. An elementary explanation is that you play cards on your turn and move your game piece according to a number displayed on the card. If you play smart, you can play multiple cards during your turn.&lt;/p&gt;

&lt;p&gt;Since I'm a developer and want to over-analyze this game even if it does not affect my bottom line, I decided to go and check if I could get some alpha (edge) over my friends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0hHPbYzI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u6flisu9qs9isiapcv0d.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0hHPbYzI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u6flisu9qs9isiapcv0d.gif" alt="Gif with Dr.Evil" width="180" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  👺 Evil planning
&lt;/h2&gt;

&lt;p&gt;There are different ways to get an advantage, but I'm interested in the one related to stats and ML (since ML is very 🔥 right now 😎 💸).&lt;/p&gt;

&lt;p&gt;Since the game has three main components: players, board and card deck, my edge can come with problem framing for one or more of these components 🔎.&lt;/p&gt;

&lt;p&gt;I know that there have been done a lot DS done for HeathStone Game which is another board game that also uses cards although in a slightly different way. I believe in standing on the shoulders of giants so I would shamlessly climb on the research done for HearthStone and try to 🛠️ it into Gremlins Inc.&lt;/p&gt;

&lt;p&gt;The first low hanging problem is to learn what's the card distribution in Gremlins Inc and do some DS viz to see if I can spot some actionable insights.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Resources for inspiring reasearch&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://towardsdatascience.com/dive-in-hearthstone-from-a-data-perspective-e3c0b2851686"&gt;Dive in HearthStone from a data perspective&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://digitalcommons.njit.edu/cgi/viewcontent.cgi?article=2789&amp;amp;context=theses"&gt;Analysis of gameplay strategies in hearthstone: a data science approachapproach&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>discuss</category>
      <category>gremlinsinc</category>
      <category>boardgame</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Tech stuff that I ❤️ reading or 👀</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Sat, 11 Dec 2021 17:34:01 +0000</pubDate>
      <link>https://dev.to/bobrinik/papers-that-i-love-2cim</link>
      <guid>https://dev.to/bobrinik/papers-that-i-love-2cim</guid>
      <description>&lt;h2&gt;
  
  
  Books
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Elements of Clojure by Zachary Tellman ⭐⭐⭐⭐&lt;/li&gt;
&lt;li&gt;Hackers &amp;amp; Painters by Paul Graham ⭐⭐⭐&lt;/li&gt;
&lt;li&gt;&lt;a href="https://datascienceatthecommandline.com/2e/"&gt;Datascience at the command line 2ed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Papers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www2.psych.utoronto.ca/users/peterson/psy430s2001/Miller%20GA%20Magical%20Seven%20Psych%20Review%201955.pdf"&gt;The magical Number Seven, Plus or Minus Two&lt;/a&gt; found when reading Elements of Clojure by Zachary Tellman&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Interviews
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=jk9S3RTAl38"&gt;Interview with a creator of R language&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conference talks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=dCuZkaaou0Q"&gt;Computer Science Metanotation bu Guy Steele&lt;/a&gt; 🔥🔥&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/results?search_query=guy+steele+growing+a+language"&gt;Growing a Language, by Guy Steele&lt;/a&gt;🔥🔥🔥&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fundamental ML papers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://direct.mit.edu/neco/article-abstract/8/7/1341/6016/The-Lack-of-A-Priori-Distinctions-Between-Learning?redirectedFrom=fulltext"&gt;No Free Lunch Theorem&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;It proves that you need to make assumptions about the data to choose the best model possible.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vita.had.co.nz/papers/tidy-data.pdf"&gt;Tidy Data&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Great Research in DS
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://mathematicaforprediction.wordpress.com/"&gt;Anton Antonov blog&lt;/a&gt; 🔥🔥🔥🔥🔥

&lt;ul&gt;
&lt;li&gt;This blog is a rare gem &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ikostrikov"&gt;Ilya Kostrikov &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>papers</category>
      <category>books</category>
    </item>
    <item>
      <title>Is it possible to do triangular arbitrage on Coinbase?</title>
      <dc:creator>Maksim Bober</dc:creator>
      <pubDate>Mon, 04 Oct 2021 02:49:11 +0000</pubDate>
      <link>https://dev.to/bobrinik/is-it-possible-to-do-triangular-arbitrage-on-coinbase-3115</link>
      <guid>https://dev.to/bobrinik/is-it-possible-to-do-triangular-arbitrage-on-coinbase-3115</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Triangular arbitrage is the result of a discrepancy between three foreign currencies that occurs when the currency's exchange rates do not exactly match up. These opportunities are rare and traders who take advantage of them usually have advanced computer equipment and/or programs to automate the process. - &lt;a href="https://www.investopedia.com/terms/t/triangulararbitrage.asp"&gt;Investopedia&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Illustration of how it works?
&lt;/h3&gt;

&lt;p&gt;Let's use a fictitious ideal example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w993Jnf4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24jed60iwksryk66lyk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w993Jnf4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24jed60iwksryk66lyk7.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see here that if you have 1 unit of &lt;code&gt;USDC&lt;/code&gt; you can sell it for 3 units of &lt;code&gt;BTC&lt;/code&gt;. Then you can sell 3 units of &lt;code&gt;BTC&lt;/code&gt; for 1 unit of &lt;code&gt;ETH&lt;/code&gt; each so you get 3 units of &lt;code&gt;ETH&lt;/code&gt;. Now, you call sell 3 units of &lt;code&gt;ETH&lt;/code&gt; for 2 units of &lt;code&gt;USDC&lt;/code&gt; each, so you get 6 units of &lt;code&gt;USDC&lt;/code&gt;. Thus by going in such a cycle you can make initial investment of 1 unit into 6 units. Pretty sweet deal 🚀🚀🚀&lt;/p&gt;

&lt;p&gt;Let's try seeing if we can do the same thing on Coinbase Pro and make some real 💸. &lt;/p&gt;

&lt;h3&gt;
  
  
  How to get data?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;After reading &lt;a href="https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts"&gt;Coinbase API docs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@Bobrinik/Coinbase?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;You will get trading pairs that are available on Coinbase Pro.&lt;/p&gt;

&lt;p&gt;You can save them to a file and then load them into your Python script to do the analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's explore it 🔬
&lt;/h2&gt;

&lt;p&gt;I decided to analyze this data with Wolfram Language since it's much easier and faster.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.wolframcloud.com/obj/9d469f68-3792-42f9-9929-b77894975277"&gt;Interactive example in Wolfram Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is how the directed graph of trading pairs looks like.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nuI227cG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/59z7o9x8ebx9dnkp9qco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nuI227cG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/59z7o9x8ebx9dnkp9qco.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we need to find out if there are any cycles that we can exploit to do Triangular Arbitrage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UrpkuFiL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2qewrof7qqknb8l2fwsj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UrpkuFiL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2qewrof7qqknb8l2fwsj.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Interestingly, there are no cycles within the trading pair graph. So it seems that you cannot do triangular arbitrage within the broker without withdrawing your money and then buying crypto again 😞&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;View live triangular arbitrage opportunities on Binance

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://eugenioclrc.github.io/binance-crypto-triangular-arbitrage/"&gt;https://eugenioclrc.github.io/binance-crypto-triangular-arbitrage/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>wolfram</category>
      <category>finance</category>
      <category>tutorial</category>
      <category>crypto</category>
    </item>
  </channel>
</rss>
