January 2020
Intermediate to advanced
532 pages
13h 31m
English
When it comes to investments, we can distinguish between ones that can be sold for cash easily in the open market and ones that take considerably more effort and time to convert into cash. Things that can easily be converted into cash within several days are known as being liquid, while the hard-to-sell ones are known as being illiquid. For example, stocks are liquid while a residence is not.
The first thing we want to do is define the traits themselves:
abstract type LiquidityStyle endstruct IsLiquid <: LiquidityStyle endstruct IsIlliquid <: LiquidityStyle end
Traits are nothing but data types in Julia! The overall concept of the LiquidityStyle trait is that it's an abstract type. The specific traits here, IsLiquid ...
Read now
Unlock full access