Kotlin 1.3 Features: Contracts
December 3, 2018
The Kotlin compiler is pretty smart when it comes to static analysis but there are still cases when the code looks perfectly obvious to a programmer but it’s very difficult to understand for the compiler. Contracts were introduced in Kotlin 1.3 and their sole purpose is to improve the static analysis by letting programmers provide an additional information on what to expect from each particular function.
Plotting Financial Data With Python: Efficient Frontier (N assets)
November 25, 2018
We already have the efficient frontier script that we created in the previous post but it has one major limitation: it does not allow us to plot more than 2 assets. Plotting 2 assets is enough to see diversification in action but it’s not practical to have a portfolio that consists of 2 assets. In this post we’re going to extend the previous script in order to support an arbitrary number of assets.
Plotting Financial Data With Python: Efficient Frontier (2 assets)
November 21, 2018
The main idea behind the Efficient Frontier is that the overall risk (volatility) of a portfolio may not be equal to the sum of the risk of its components so some combinations are better than others. In this post we’re going to visualize the optimal weights of 2 given assets in a hypothetical portfolio.
Smartphone Lifespan and Pricing
November 14, 2018
As an Android developer, I’ve been passionate about smartphones for quite a while. It always seemed to me that I should update my smartphone every year or two in order to get all of the exciting new features that were constantly added to the mobile platforms via the hardware upgrades and software enchantments but it seems like those old rules do not apply anymore.
Crypto Currencies as an Asset Class
November 5, 2018
Bitcoin, the world’s first crypto currency, had it’s 10th anniversary just a few days ago. It’s price has risen from nearly zero to a whooping $20,000 per “coin”, although it went down from those all time highs and now it’s trading for about $6,500. As anyone would expect, such a phenomenon cannot avoid generating a lot of drama and controversy.
Kotlin Game Development: Finalizing The Game
October 20, 2018
This is the last part of the “Kotlin Game Development” series and we are going to add the “game over” scene to our snake game and also reflect on the whole process. It might be helpful to read the previous posts first in order to understand what’s going on.
Kotlin Game Development: Model
October 18, 2018
We need a model layer to define what objects will exist within our game. We can define any object but since we’re working on the snake game it makes sense to start with the essentials: snake and apple. Feel free to add more objects such as bonuses if you think it would make the game more interesting.
Plotting Financial Data With Python: Comparing Returns
October 11, 2018
It’s hard to compare the returns on the given securities just by looking at their price history in absolute terms so we need to find a better way of comparing historical returns. One of the possible solutions is to adjust the whole data series in such a way that the first data point would be equal to some predefined number. We are going to adjust the price history of both stocks so they will always start with the same value, let’s say 100. This method allows us to see what would happen with $100 invested in 2 given stocks on the date D.