Musings of a dad with too much time on his hands and not enough to do. Wait. Reverse that.

Tag: finance (Page 2 of 2)

Two convenient techniques to collect financial data for analysis

As I stare college bills in the face and know that retirement awaits in the not-too-distant future, I’m working hard to improve my financial literacy. One way I’m trying to do this and work on my programming and data analysis techniques at the same time is to download financial data directly and do some direct analysis with tools like pandas. Right from the start, I’ve found two convenient ways to download the financial data you wish to examine.

Option 1: quandl

Quandl is a great source for datasets and they make accessing their data even easier with their API. One big drawback I’ve encountered with the API is that I have yet to get it to work behind my company’s firewall. The only other point to note is that if you intend on making over 50 calls in one day, you’ll need to get a free API key.

import quandl

df_amzn1 = quandl.get("WIKI/AMZN", start_date="2018-01-01", end_date="2019-01-01")
df_amzn1.head()
The quandl result set

Option 2: pandas-datareader

Pandas-datareader wraps a lot of interesting APIs and hands the results back to you in the form of a pandas dataframe. In my example, I’m using pandas-datareader to call the Yahoo finance API to get Amazon stock price information. Apparently, the Yahoo API has changed too much/too frequently to the point where the pandas-datareader folks have said “enough, already” and deprecated their support of the API. Not content to let go just yet, others have offered up the aptly named fix-yahoo-finance package that can be used to plug the Yahoo hole in pandas-datareader. One other note: unlike quandl, I have successfully used pandas-datareader behind my company’s firewall. If you find yourself with SSL and timeout exceptions at work, you may want to give pandas-datareader a try.

from pandas_datareader import data as pdr
import fix_yahoo_finance as yf

yf.pdr_override()
df_amzn2 = pdr.get_data_yahoo("AMZN", start="2018-01-01", end="2019-01-01")
df_amzn2.head()
The pandas-datareader result set

Get your documentation together

Almost seven years ago, I listened to an episode of the Survival Podcast that I still think about from time to time–an episode on estate planning. Many years later, I finally listened to it again so I could take some notes on the important documents attorney Mark Matthews (the individual interviewed in the podcast) considered important documents to create. I’m sure the law has changed much since then, but I suspect most of these documents are still important, so I will write my notes out here.

Financial Power of Attorney

A Financial Power of Attorney is a document that grants another person–an “agent”–the ability to act as you in financial matters. If you in some way become incapacitated, your agent will have access to your money to pay your bills and other expenses. One fear with a power of attorney is that the agent will simply abscond with your assets. By law, though, your agent must act as a fiduciary: someone who has a duty of care and loyalty to you. Another fear is that once the power of attorney is signed, the agent immediately inherits that power. That’s not necessarily the case: yes, you can craft the document to take effect immediately, but, alternatively, you can state that the document goes into effect only when you become “incapacitated” or “incompetent” or even “detained under duress” (if you were kidnapped abroad or jailed for a prolonged period of time).

Advanced Medical Directive

The second important document Mr. Matthews mentioned is the Advanced Medical Directive. Two important components of the Advanced Medical Directive are the Healthcare Power of Attorney and the Living Will. The Healthcare Power of Attorney designates an individual to act on your behalf in matters of healthcare. One important responsibility of this individual is managing and distributing your medical records to appropriate third parties. As obtaining medical information from doctors and hospitals can be difficult, this provision can be pretty important.

The Living Will clearly establishes how you wish to be treated should you succumb to certain medical conditions that leave you, say, living only by the grace of a machine. A Living Will makes it clear to your surviving family how they should deal with you in those situations–“pull the plug” or not and under what conditions. There is no guessing “what Mom would have wanted” and, therefore, no need for guilt or quarrel among the surviving family.

Traditional Will

Mr. Matthews mentioned Wills only after a lengthy discussion of the Financial Power of Attorney and Advanced Medical Directives, so he would seem to value those two documents above the third. Wills address a variety of concerns:

  • Who inherits what assets
  • Where minor children are concerned, who becomes the guardians of these children
  • Who is the Executor–the person in charge of dispensing the Will

Apparently, with the execution of a Will, a bond must sometimes be paid. It seems your Will can address some of those concerns–whether or not the executor must post a bond, whether or not a bondsman must be hired. Mr. Matthews called that “surety”.

Although a lot of people have drawn up wills, do your survivors know of your will and even where it is? Consider these questions:

  • Have you told your executor that he or she is your executor?
  • Does your executor know where your will is?
  • If your will is in your safe deposit box, will your survivors be able to access it after your gone?

In short, you may have a Will, but if no one knows about it or can get a copy of it, you don’t have an “executable plan.” [Cue the old tree-falling-in-the-woods joke.]

Memorandum of Distribution

A fear many have with traditional wills is that when they draw up the will, they may have a particular way they want to divvy up their assets among their survivors; however, years later, they may decide they want to change that distribution arrangement. Does that mean they have to tear up their current wills and pay more legal fees to draw up a new onewith their new distribution arrangements? In some States, the answer is “no.” Some States like Virginia honor a separate Memorandum of Distribution of Tangible Personal Property. If your State honors such a document, you can draw up a will that references this separate document that details how you wish your assets to be distributed. Then, on your own, you can write up your own Memorandum of Distribution without additional legal fees. If, later, you decide to change that distribution, you can tear up your current Memorandum and write a new one.

Bequeath the gift of Peace

One insight here from Mr. Matthews I found valuable was dispelling the attitude of just “splitting your assets X ways between your X kids” (fill in X for the number of children you have). It seems to me that, in addition to distributing your assets to your survivors according to your wishes and in the most tax efficient manner possible, you should also aim to leave your family in as much peace as possible. This means drawing up proper Advanced Medical Directives so that you can absolve your survivors of any guilt and fear they might have over making those decisions for you. This also means being very specific regarding the divvying up of your assets. Stating vaguely that your assets should be evenly split among your heirs will likely result in your heirs fighting over who gets your boat or vintage car or baseball card collection. Don’t be vague–be specific.

HIPAA Authorization Document

A HIPAA Authorization Document is a “short form” release of information authorization that your healthcare power of attorney agent can use to gather and distribute your medical information without otherwise having to fax around your entire Advanced Medical Directive. This saves time and paper, but more importantly, it preserves your privacy in that you’re only sending around this short authorization form and not your full Advanced Medical Directive with your Living Will and all those personal details contained therein.

Trusts

Everyone says “trusts are not for everyone,” but it seems to me that trusts should probably be for many people–just see my next section on Estate Taxes. Apparently, there are many flavors of trusts. Mr. Matthews discussed three:

  • Revocable Living Trust: the Revocable Living Trust is a common form of a trust. This is a trust that you set up during your lifetime and can change it at will. With this instrument, you can move your money into the trust then write up instructions to, say, incrementally distribute your funds to your children over time. You can even include instructions to have the funds of the trust invested in something that will allow the funds to grow as they sit and wait to be distributed.
  • Marital Trust: this is a trust that you establish with your spouse. If you die before your spouse and you have funds that will be subject to estate taxes, instead of passing those funds to your spouse and subjecting him or her to those estate taxes, you can instead shelter those funds in a Marital Trust.
  • Irrevocable Life Insurance Trust: this is a trust that owns a life insurance policy on you and serves as another avenue of sheltering money away from the brutal federal estate taxes.

Estate Taxes

This interview occurred in 2012. At that time, US federal law exempted the first five million dollars of a person’s estate from the estate tax. In 2013, the law changed: only the first one million dollars of a person’s estate was exempt from being taxed. In 2012, the estate tax was 35%. According to Mr. Matthews, in 2013, the tax was raised to 55%. [side note: the law may have changed again since the interview but, today, it would seem that the tax rate is 40% and the exemption seems to now be at $11 million].

The IRS has their own formula for determining what parts of your estate are subject to estate taxes. This includes your money and your house, among other assets, but, interestingly, it also includes your life insurance policies. So, if you have a one million dollar life insurance policy, that’s one million dollars subject to estate taxes, even though life insurance payouts themselves are not subject to income taxes. Go figure. So, it’s not unimaginable that a thoughtful, frugal, middle class family might bump up against or exceed the IRS’s exemption. In such instances, a trust can help soften the kick-in-the-face that is the US government. One memorable line from the interview: many heirs are “asset rich but cash poor.” If you think a portion of your estate might be subject to estate taxes, try not to leave your heirs with that bill.

Finding a good Estate Planner

So how do you go about finding an estate planner as thoughtful as Mr. Matthews?

  • You can check with your State bar association as they will be able to refer estate planning attorneys
  • Mr. Matthews recommended checking with Wealth Counsel, an organization he belongs to, for referrals
  • In general, as you converse with your estate planner, make careful observation: is your attorney truly listening to you? Is he restating your goals back to you? Is he taking notes?

Get on it

I am quite derelict in getting these documents drawn up myself, but I’m hopeful I can get at least a few of these done this year. In addition to listening to this particular podcast some time ago, I also learned about the site Get Your Sh*t Together, a site dedicated to just these tasks. I’ve not used the site–don’t know if it’s free or not–but it might be worth checking out.

Data driven investing

I found a recent episode of the Cashflow Academy podcast rather interesting and wanted to share some notes I took on the show. Host Andy Tanner interviewed Keith McCullough, professional investor and author of the book, Diary of a Hedge Fund Manager.

The crux of the interview was around Mr. McCullough’s data-driven approach to investing. Much of Mr. McCullough’s algorithms for predicting the path of financial markets is based on the second derivative of Calculus.

Everything that we do is based on the second derivative or the rate of change.

Keith McCullough

The two predominant categories McCullough factors into his second derivative calculations are growth data and inflation data. As an aside, investment guru Ray Dalio, in his book Principles, also stated that growth and inflation are the two most important challenges to solve for in investing.

I’ve learned over the years is that if we get those two very basic things right–growth and inflation and whether it’s accelerating or decelerating, getting better or worse–then we’re in a pretty good place.

Keith McCullough

GDP appears to one of his “growth data” datapoints. GDP just set a new record for accelerating for nine straight quarters in a row.

According to his calculations, though, that rate won’t maintain as he’s predicting a deceleration in Q1 2019. Consequently, he sold all his fast growth products and bought slower growing ones that do well when GDP and inflation are slowing–like long term bonds, the US dollar, and utility stocks.

Interest rates are another datapoint McCullough seems keenly interested in, given the tight relationship between interest rates and inflation. Interest rates seems to rise when both growth and inflation are accelerating at the same time.

McCullough then transitioned into discussing his Four Quad Model: Growth and Inflation, modeled on a second derivative basis, have one of four different outcomes or “quads”. Quad 2 is when both growth and inflation are accelerating at the same time. Quad 4 is the opposite: both growth and inflation are slowing at the same time. Interest rates also usually fall in a Quad 4. Interest rates have been on the rise for about the last three years. Now Mr. McCullough thinks that, in the next 3-4 quarters, inflation will start falling and interest rates will fall in kind.

Throughout the conversation, Mr. Tanner also injected some interesting thoughts. Mr. Tanner underscored four important principles in managing your finances:

  1. Gather fundamental data
  2. Gather technical data
  3. Maintain a position for cashflow
  4. and manage your risk by investing

In a brief tangent on real estate investing, Tanner mentioned two datapoints he valued highly:

  1. Net Operating Income (NOI)
  2. Capitalization Rate (aka Cap Rate)

Mr. Tanner also mentioned a few other terms I must research:

  • Factor exposures — popular quantitative strategies/predictive tracking algorithms
  • Momentum — I believe one type of “factor exposure”
  • High Beta
  • Technology Sector Factor
  • Delta Hedging

Newer posts »

© 2024 DadOverflow.com

Theme by Anders NorenUp ↑