Posts

Building an (somewhat) automated analysis suite on a Mac Part 2

Image
Update: The same techniques outlined here will also work on Windows, though the specifics may vary - same with Part 1 (it's probably even easier to setup the database on Windows)  Following on from Part 1 - it's unsurprisingly... Part 2! So we're at a stage now where we can read data in Excel from our database... but there's no real automation going on here, right? Well, let's begin to solve that. There are a few goals here: Keep it simple, stupid Keep it flexible Expect change New data sources should be quick to add Keep it simple, stupid To be honest, this is the goal of most good software systems, sometimes people chuck in DRY , but I'm not going to call it out as a goal - lest I take it to extremes and waste time. Though I will add, if you ignore DRY as a hard and fast design principle as I'm going to do, you should follow The Boy Scout Rule  to identify and remove any duplication over time. So first off, we need to think about what th...

Building an (somewhat) automated analysis suite on a Mac Part 1

Image
As a programmer I never thought I'd say it, but... I'm warming to Excel. However, I'm also a bit of a die hard Mac User and using Excel on a Mac is not without it's challenges, but sometimes limitations force creativity - hopefully that's what's occurred here. Very quickly I got bored with downloading CSV data and opening it in Excel, then adding new sheets and basically copying the same process over and over for each data set. My first thought was to try using web queries to grab CSV on demand. Unfortunately on a Mac, this process isn't very well documented and didn't seem to work very well at all, so I quickly gave up. The next thing I thought about was writing some tools to stick stuff in a database and then pull it out (automatically-ish) into Excel. This has the added benefit that I can store data locally and I'm not reliant on the back-data that a given API has, it also meant if the API only returned JSON and not CSV, I wasn't s...

No one understands the CME/CBOE Bitcoin Futures

Image
There's a lot of hype and hysteria still, around the CME/CBOE Futures markets, with people making really strange claims about the impact they have on the BTC market. There's just one problem - almost none of these people know what they are talking about. They're in good company though. Here's a video of Jordan Belfort (Wolf of Wall Street) and Richard Quest  both  getting it wrong.  There's also this article from Noah Smith (note, it is more of an op-ed than an article) of Bloomberg getting it entirely wrong, and there are countless others making the same mistakes - especially once we get out of the "professional" commentators , who should have done their homework better! So what are people getting wrong? Myth #1 - Wall Street can short Bitcoin via futures No. No they can't. The futures are a derivative product that are cash settled . That means at the expiration of the futures, you get cash, not Bitcoins. This isn't like non...

Sentiment Analysis with Tiingo and Google

Image
A few days ago I was aimlessly surfing the net when I realized that both Microsoft and Google have text sentiment analysis APIs which are both simple to use and free to try out. This got me wondering if I could apply it to financial news and potential build some kind of market/ticker sentiment indicator. The answer is kinda. Below is the output of the script that I ended up with after a few hours of hacking. Story Time Enter Microsoft... The first API I had seen was actually the Microsoft one , as I was wanting to play with Microsoft's Azure for totally unrelated purposes. As soon as I saw it, I knew what I wanted to do - Tiingo has a fantastic news API which lets you search for news items based by financial tickers. It's super simple to use, you just do a GET on a URL with the tickers you want to look up on, like the following (requires paid Tiingo account): https://api.tiingo.com/tiingo/news?tickers=msft,googl,aapl,fb and it'll bring back a whole bun...