Espindola's bloghttps://blog.espindo.la/Espindola's blogenMon, 05 Mar 2018 05:44:04 GMTNikola (getnikola.com)http://blogs.law.harvard.edu/tech/rssSite C and the BC Greenshttps://blog.espindo.la/posts/site-c-and-the-bc-greens/Rafael Ávila de Espíndola<div><p>I was disappointed when I first learned that the BC Green Party was
against the constructions of the <a class="reference external" href="https://www.bchydro.com/energy-in-bc/projects/site_c.html">Site C hydroelectric dam</a>. The
only criticism of the project I saw at the time was about loss of
land and harm to local communities and environments.</p>
<p>Those are the arguments I would expect from a "tree hugger", not a
factual environmentalist. Looking into it I found out that the BC
Greens actually have a good reason for opposing the project and I would
like to share it.</p>
<p>I think the "tree hugger" arguments are weak because our fossil fuel
dependency and global warming are critical problems. If those are not
solved we risk far greater damage to our society and environment.</p>
<p>To solve these great problems we need renewable energy sources. Gains
in efficiency will not be sufficient. In Canada the <a class="reference external" href="https://en.wikipedia.org/wiki/List_of_countries_by_energy_consumption_per_capita">energy
consumption per capita</a>
is about 9.6 <span class="math">\(KW\)</span>. As we know from <a class="reference external" href="https://en.wikipedia.org/wiki/The_Matrix">The Matrix</a> (and from a 2 <span class="math">\(KCal\)</span> diet),
a human body consumes about 100 <span class="math">\(W\)</span>, so about 1% of what we
use. We had horses and firewood before industrialization, but it
should be clear that to depend on efficiency gains is suicidal.</p>
<p>Fortunately in BC most of the electricity is already renewable
(hydroelectric), but electricity is just a part of our energy
consumption. We have to replace <a class="reference external" href="http://www.statcan.gc.ca/tables-tableaux/sum-som/l01/cst01/trade37c-eng.htm">our use of gasoline and diesel</a>
and <a class="reference external" href="http://www.statcan.gc.ca/pub/11-526-s/2013002/t003-eng.htm">natural gas</a>. With
the current technology electrifying transportation and heating seems
the best alternative.</p>
<p>I first realized that the Greens must be thinking about this when I
found that their <a class="reference external" href="https://d3n8a8pro7vhmx.cloudfront.net/greenpartybc/pages/2300/attachments/original/1493054476/2017-platform-bcgreenparty-print.pdf">platform</a>
lists electrification.</p>
<p>Lets see how much electricity we need. I got the energy content of the
various fuels from Wikipedia and the efficiency is an educated guess.</p>
<p>5,770,067 cubic meters of gasoline with 32.18 <span class="math">\(GJ/m^3\)</span> thermal and an
engine <a class="reference external" href="https://en.wikipedia.org/wiki/Thermal_efficiency">thermal efficiency</a> of 30% gives
55.7 useful <span class="math">\(PJ\)</span> per year.</p>
<p>1,747,579 cubic meters of diesel with 35.86 <span class="math">\(GJ/m^3\)</span> thermal and an
engine thermal efficiency of 40% gives 25.1 useful <span class="math">\(PJ\)</span> per year.</p>
<p>The natural gas table is already in energy units: 98.1 <span class="math">\(PJ\)</span>. To
replace that with heat pumps with a <a class="reference external" href="https://en.wikipedia.org/wiki/Coefficient_of_performance">coefficient of performance</a> of 4 we
need 24.5 <span class="math">\(PJ\)</span> per year.</p>
<p>The total is 105 <span class="math">\(PJ\)</span> per year, which is 3.34 <span class="math">\(GW\)</span> or
29.25 <span class="math">\(TWh\)</span> per year.</p>
<p>Site C is 5.1 <span class="math">\(TWh\)</span> per year. We need 5.73 times what it would
produce to replace our fossil fuel use.</p>
<p>So we need a lot of electricity, but is Site C the best way to get a
part of it? In a reply to an email I sent about it to the Green Party
I was pointed to a <a class="reference external" href="http://www.andrewweavermla.ca/2015/11/24/seeking-leadership-bc-green-party/">speech</a>
where Andrew Weaver mentions Oregon and Washington. I got curious as to
what they are doing for electricity.</p>
<p>Oregon has a population a bit smaller than BC. In 7 years (2005-2012)
Oregon added 5.6 <span class="math">\(TWh\)</span> per year of <a class="reference external" href="https://en.wikipedia.org/wiki/Growth_of_wind_power_in_the_United_States">wind power</a>.</p>
<p>It seems possible then for BC to get the equivalent of the Site C
generation from wind in the time it would take to finish Site C. Wind
can also be built incrementally, and Site C will produce nothing in
the next 7 years.</p>
<p>Another advantage of wind is that there is a lot of it. According
to <a class="reference external" href="https://www.bchydro.com/content/dam/hydro/medialib/internet/documents/planning_regulatory/iep_ltap/ror/resource_options_update_session_presentation.pdf">BC Hydro</a>
itself there is a potential for 38.9 <span class="math">\(TWh\)</span> per year which is more than
sufficient for replacing current fossil fuel use.</p>
<p>Which brings us to the real reason to oppose Site C: there are other
ways to get our renewable energy and we should consider their
cost. And the cost of wind is <a class="reference external" href="https://blogs.scientificamerican.com/plugged-in/wind-energy-is-one-of-the-cheapest-sources-of-electricity-and-its-getting-cheaper/">very competitive</a>.</p>
<p>And since we are talking cost, why is BC Hydro the one that has to
decide what gets built? Electricity generation is an area that
allows for competition, now more than ever with wind going mainstream.</p>
<p>BC hydro could just buy renewable electricity and let the market
figure out what is the cheapest option. It looks like it would be
wind, but if in the end someone figures out a way to finish Site C at
a lower cost, that would be great.</p>
<p>I was very happy to find out (in the same speech) that that is exactly
the position Andrew is pushing for.</p>
<p>Long story short, my first impression of the party was wrong. I have
decided to join the party and so far I am very happy with that
decision.</p></div>mathjaxhttps://blog.espindo.la/posts/site-c-and-the-bc-greens/Sun, 26 Nov 2017 17:00:00 GMTCanadians should not retire at 65https://blog.espindo.la/posts/canada-retire-65/Rafael Ávila de Espíndola<div><p>Or at least, they should not take the canadian pention plan (CPP)
at 65.</p>
<p>The age one should claim a pension depends on the life expectancy, but
also on objectives. In this post I look at a simple objective:
maximizing payments. The post ignores things like reinvesting the
payments or needing the money earlier for whatever reason.</p>
<p>The <a class="reference external" href="https://www.canada.ca/en/services/benefits/publicpensions/cpp/cpp-benefit/amount.html">CPP rules</a>
say that you can claim it any time from 60 to 70, but 65 is the
default, so why not?</p>
<p>To incentivize people to retire later, each month after 65 years
increases the monthly payment by 0.7% (1.4% for two month, 2.1% for
three, 42% at 70 years). In a similar way, each month before 65
reduces the monthly payment by 0.6% (1.2% for two months, 1.8% for
three, 36% at 60 years).</p>
<p>The asymmetry (0.6% versus 0.7%) has in interesting impact. Lets first
look at what would happent without the asymmetry.</p>
<p>Without it, given any retiment month <span class="math">\(T\)</span>, the monthly payment would be</p>
<div class="math">
\begin{equation*}
R(1 + K(T - 65*12))
\end{equation*}
</div>
<p>where <span class="math">\(R\)</span> is the monthly payment you would get at 65 years, and
<span class="math">\(K\)</span> is the relative gain or loss each month (the 0.7% or 0.6% in the
case of the CPP).</p>
<p>Now lets consider when it makes sense to delay retirement from
<span class="math">\(T\)</span> to <span class="math">\(T+1\)</span>. If one dies at <span class="math">\(D\)</span> months, each of the
remaining <span class="math">\(D - (T + 1)\)</span> payments will be <span class="math">\(R*K\)</span> bigger. On
the other hand, one would miss out on the original first payment. So
delaying retirement by one month from <span class="math">\(T\)</span> is worth it when</p>
<div class="math">
\begin{equation*}
(D - (T + 1))R*K > R(1 + K(T - 65*12))
\end{equation*}
</div>
<p>Which simplifies to</p>
<div class="math">
\begin{equation*}
T < \frac{D - \frac{1}{K} - 1 + 12*65}{2}
\end{equation*}
</div>
<p>Since <span class="math">\(T\)</span> is an integer, and it profitable to go from <span class="math">\(T\)</span>
to <span class="math">\(T+1\)</span> when <span class="math">\(T\)</span> is smaller than the right hand side, we
conclude that the best <span class="math">\(T\)</span> to retire is</p>
<div class="math">
\begin{equation*}
T = \left\lceil\frac{D - \frac{1}{K} - 1 + 12*65}{2}\right\rceil
\end{equation*}
</div>
<p>Note for every 2 months increase in the life expectancy <span class="math">\(D\)</span>,
<span class="math">\(T\)</span> goes up by 1. A change of <span class="math">\(K\)</span> is just an offset.
Lets see what a plot looks like for a <span class="math">\(K\)</span> of 0.6% or 0.7%.</p>
<object class="align-center" data="https://blog.espindo.la/canada-retire-65/death_to_retirement.svg" style="width: 800px;" type="image/svg+xml">
/canada-retire-65/death_to_retirement.svg</object>
<p>So if <span class="math">\(K\)</span> were always 0.6% or 0.7% (or any other value), it would
be easy. Make a guess about the life expectancy and read the best
retirement age in the graph.</p>
<p>Given that in the CPP <span class="math">\(K\)</span> changes at 65, what happens at the
transition? When the best retirement age is above 65, we are in the
0.7% rule. When it is below, we are in the 0.6% rule. Let's take a look
at just those data points</p>
<object class="align-center" data="https://blog.espindo.la/canada-retire-65/death_to_retirement_f.svg" style="width: 800px;" type="image/svg+xml">
/canada-retire-65/death_to_retirement_f.svg</object>
<p>There is still an overlap around a life expectancy of 78 years. If
<span class="math">\(T\)</span> were not required to be an integer, the difference in the
best retiment age between two values for K would be</p>
<div class="math">
\begin{equation*}
\Delta T = \frac{D - \frac{1}{K_1} - 1 + 12*65}{2} - \frac{D - \frac{1}{K_2} - 1 + 12*65}{2} = \frac{1}{2K_2} - \frac{1}{2K_1}
\end{equation*}
</div>
<p>For 0.6% and 0.7%, that is about 11.9 months. What we want to find is
when is it worth to transition from</p>
<div class="math">
\begin{equation*}
T_1 = \frac{D - \frac{1}{K_1} - 1 + 12*65}{2}
\end{equation*}
</div>
<p>to</p>
<div class="math">
\begin{equation*}
T_2 = \frac{D - \frac{1}{K_2} - 1 + 12*65}{2}
\end{equation*}
</div>
<p>The logic is the same that we used for retiring from <span class="math">\(T\)</span> to
<span class="math">\(T+1\)</span>: the extra amount earned on the months that are left has
to be larger than the lost payments</p>
<div class="math">
\begin{equation*}
(D - T_2)((65*12 - T_1)K_1 + (T_2 - 65*12)K_2) > (T_2 - T_1)(1 - K_1(65*12 - T_1))
\end{equation*}
</div>
<p>Doing the substitutions (I used <a class="reference external" href="https://www.ginac.de/">GiNaC</a>) we get</p>
<div class="math">
\begin{equation*}
\frac{D^2}{4000} - \frac{39D}{100} + \frac{12276379}{84000} > 0
\end{equation*}
</div>
<p>Which has a solution of a life expectancy just over 77 years and 10
months. For the discrete case we can just test the 0.6% and 0.7%
solutions and pick the best. The combined result is on the last graph:</p>
<object class="align-center" data="https://blog.espindo.la/canada-retire-65/death_to_retirement_c.svg" style="width: 800px;" type="image/svg+xml">
/canada-retire-65/death_to_retirement_c.svg</object>
<p>And indeed, with a life expectancy of 77 years and 10 months one
should retire at 64 years and 6 months. But with a life expectancy
just a month longer, the best retirement age is 65 years and 6 months.</p>
<p>When I first got curious about this I was lazy and just wrote a python
script to try all the possible retirement ages. I was surprised to see
the discontinuity in the graph and decided to do the math to see what
was going on.</p>
<p>The program is available at <a class="reference external" href="https://gitlab.com/rafael.espindola/best-cpp-age">gitlab</a> in case anyone
wants to try it.</p></div>mathjaxhttps://blog.espindo.la/posts/canada-retire-65/Sat, 05 Aug 2017 17:00:00 GMTAirbnb crackdown in Victoriahttps://blog.espindo.la/posts/airbnb-victoria/Rafael Ávila de Espíndola<div><p>The Victoria city council <a class="reference external" href="http://www.timescolonist.com/business/victoria-council-may-target-short-term-vacation-rentals-in-housing-crackdown-1.20557393">is trying to restrict short term rentals</a>.</p>
<p>Ironically when we moved to Victoria airbnb made the move much easier
than moving to Toronto a few years before. With airbnb it was possible
to search for various options and find a convenient 1 month rent.</p>
<p>In my previous move there was no airbnb. Despite Toronto being much
bigger, there were fewer choices. There were no reviews on the choices
and paying for it from outside Canada was inconvenient.</p>
<p>The airbnb that we rented for the move is a small basement in a
house. Not the kind of space that would normally be used as a regular
rental or bnb. We had a similar experience in Stratford. The
convenience of airbnb does seem to create options that would simply
not exist otherwise.</p>
<p>Airbnb is criticized for increasing the cost of long term rentals, which
is likely true, but it also creates interesting subletting
possibilities. In trips to Montreal and Vancouver we stayed in units
that were clearly sublet. By crashing at a friend's place for a
weekend a tenant can offset a substantial part of their rent.</p>
<p>But yes, in another trip we have stayed in a pretty conventional
apartment that could have been otherwise rented long term. Even here
it is important to discount the fact that a higher return on
investment for landlords incentivizes the construction of more
units. In the current construction boom in Toronto some of the
buildings are bought mostly for investment. <a class="reference external" href="https://www.theglobeandmail.com/news/investigations/investigation-x2-condo-toronto/article34906278/">Not as many would have
been built otherwise</a>.</p>
<p>There is a fairness issue too. If when traveling to, for example,
Montreal we can stay in a airbnb, it feels wrong to deny the same to
Montrealers visiting Victoria.</p>
<p>Overall increasing the utilization of a scarce resource like space
seems like a good thing, even if renters like myself get the short end
of the stick.</p>
<p>The higher housing prices will also generate higher property
taxes. The surplus could be given back to the community as income, but
that would be another post.</p></div>https://blog.espindo.la/posts/airbnb-victoria/Wed, 12 Jul 2017 04:14:00 GMT