Saturday, December 27, 2014

How to connect an Arduino with an NFC shield?

One day, at a spur of the moment, I decided to buy an Arduino uno R3 and a dynamic NFC shield. I read a few websites that sang praises about the Arduino's capabilities and ease of use by hobbyists (who need not be electrical engineers) so I thought that it should be easy to connect, much like how you plug your monitor to your CPU or similar.

The packages arrived through mail and when I opened the box, I was clueless at how I should connect it. I read the "datasheet" and "schematics" documentation but could not understand how it could be called documentation -- it did not tell you step 1-2-3, do this, do that, etc.

The documentation is in the form of a link like that: Arduino Uno R3 schematic.

NFC shield schematic. The diagram shows that there are 2 LED lights. Those will light up when power is connected.

Editted on 16 Jan: It turned out that a Male-Female jumper wire (easily searchable from google) was require to connect the NFC shield with the Arduino. All 6 pins were connected and it functioned as a tag.

The NFC shield has 6 pins.
Pinout diagram that I referenced from blog.arduino.cc.

The same pinout diagram with the 6 pin holes highlighted.

Unfortunately, at this point, the example code I test-loaded on the board still did not work, so I am still figuring that out.

I wanted to write different URLs dynamically to a tag as an advertisement. At this rate of fumbling, I have no idea when that idea will see light.

[Updated on 5 Feb 15]: After writing on the supplier's facebook that the example code didn't work, and nobody replied to 4 of my emails sent over 2 months, a reply came within the day that the example code was wrong and I was provided with a working code.

Friday, December 26, 2014

Choosing shares - what do I believe in?

This is the question I always ask when I meet a like-minded investor.

When my friends ask me what shares to buy, I ask them the same question, what do you believe in?

The principle behind this simple question will determine how you approach choosing the "right" share for you. As strangely as it sounds, there are shares that are more "right" for you, than your neighbour, although the shares' performance are independent of the buyer.

Long-term partnership
The share you choose will remind you of its existence every day, for as long as you keep it, through the monthly statements sent to you from the central depository. It will show you how much it is worth based on the last done price for the month, and at the end of every year, an accumulated dividend payment statement. Choosing the "right" share will mean that you will likely be in a better position to perform your yearly assessment whether to keep or sell or buy more. In bad times, you also need to know the fundamentals of the share well to know whether the share's future's performance will be better or worse. Treat this as a long-term partnership, and know your shares like how you would approach choosing your partners. I choose the companies that interests me or that I would consider working for given the chance.

Short vs long-term goals
Know your short, long, and longer term goals, and always review them yearly. I have my yearly reviews at the end of the year when everyone starts reminding me about "new year resolutions". My goals had changed over the years. Ten years ago, my short term goal was to concentrate at building my honey pot, so I buy and sell shares whenever the sell price is more than my buy price by 20%, if the time gap is less than 2 years. The reason behind that "formula" as that I will get to "cash in" on the dividends 2-3 years in advance, and channel the money into another share for growth. My long term goal then was to buy a fat bucket of blue chips after I save up my honey pot. I had since filled my honey pot and am filling my bucket (not fat yet) with blue chips and that "fattening" has become my long term goal. My immediate action plan to fatten my bucket is to choose asset-rich companies with high capital appreciation growth -- prime real estate and specialised skills trade. My short term goal now is to invest in Real Estate Investment Trusts (REITs) to secure an income stream early to benefit from the effects of compounding.

If you can get through these two points, you are on your way to a great start every new year!


Monday, December 22, 2014

Whole life insurance - what made me buy it?

I had always been a staunch DISbeliever of insurance. When I first started a temp job before undergrad studies when I was 18, I started to read about insurance and what I had to prepare for the illusive "work life" that was about to begin in a few years.

Firstly, we work for money. Insurance companies and agents work for money too. As such, I saw them as a casino banker where premiums are just odds in the game of life (and death and accidentals and whatever-insured) priced such that they will earn enough to pay their shareholders. In other words, we will likely be at the losing end unless we become an insurance agent to benefit from the system. (It did cross my mind to be an insurance agent at some point, but it was just against my conscience.)

Secondly, nobody will look after our interests more than ourselves. If I were to spend 8 hours a day working hard to earn my salary, I will likely feel more interested to safeguard my money than someone else who did not have to work for it. Imagine how many parents complain about their children spending money without knowing how hard it is to work. Insurance is similar. The agent you engage, may not even earn more than you do, lest have your interest at heart. His priority is probably his commission from the sale because it translates to his livelihood.

With these two reasons, I was sufficiently convinced that I had to be my own financial planner to insure my livelihood. After planning for myself and achieving desired outcomes, I am even more convinced that insurance is a luxury product.

There are different areas of insurance, but most people will likely "need" the same few bare minimum. The "wants" begin at #6. The following is in order of importance (from my point of view).

1. Basic medical insurance: In Singapore, this is called Medishield, which is the bare minimum that every citizen needs and are subsidised to buy by the government. When you do claim, it's a fixed sum, and you have to pay the balance, which can be substantial. Hospitalisation charges are not covered for private hospitals. Premiums are payable through Medisave (under Central Provident Fund CPF).

2. Private medical insurance (top-up of Medishield): In this top-up version of medical insurance, the insuree pays the first $3,000 and co-pays 10% of the balance. The premiums are payable through Medisave. If I earn a gross <$3,000 a month salary, this was the most I will buy.

3. Savings: Save money in your piggy bank. After having your medical expenses covered, a saving regime is essential if you intend to continue to live in expensive Singapore. For this, the cheapest savings plan is to be self-disciplined and set aside a fixed sum every month. For the ill-disciplined, the banks have some savings plan that help you to lock up your money. If you have someone you can trust, do a recurring monthly transfer to their bank account and ask them to hold the money for you. If all options are out, I will say volunteer at an old folks home or any charity organisation for a few months to gain enlightenment. Maybe listening to a few bankrupt or gambler re-tell their stories and regret may make you a little more aware of the importance of savings. Endowment plans are NEVER entirely equal to a saving plans, because you need to have savings that are liquid -- you can draw on them in rainy days. A sizable piggy bank for day-to-day use is 3 months of your monthly salary.

4. Personal development: After you have succeeded in a savings plan, work on improving your own worth with constant skills learning and upgrading and make it a habit, a life long one.

5. HDB mortgage: If you have to take up a mortgage loan, choose the HDB loan whenever possible because it comes with a (mandatory) mortgage insurance that is cheaper than commercially available ones, and more importantly, allows premiums to be paid with your CPF money, which means there will not be additional cash outlay, assuming you do not overstretch your loan in the first place.

The "needs" will end around here, and the "wants" will begin.

6. Term life insurance: At this point, if you are the sole breadwinner for your family, and have children, a term life insurance will become essential. This premium should not be more than 1% of your income. If the sum insured sounds too little, you should start cutting on expenses whenever possible.

7. Emergency Fund: This is for use on rainy days. This amount should be over and above whatever you have set aside for #1 to #6, and be between 9 to 12 months of your monthly salary.

8. Education: Your children's education is important and will likely cost more and more as the years go by, so you might be tempted when the bank or insurance agent tries to sell you endowment policies for education. This will be about the right time to learn how to invest in stocks.

9. Opportunity Fund: Stock markets have cycles and you will not want to miss the party or the boat when it comes, so having a stash of cash for such opportunities will go a long way.

10. Retirement: The Supplementary Retirement Scheme (SRS) allows you to top up your retirement fund with a maximum of $12,750 a year in cash and enjoy tax reliefs. You can withdraw your money from this fund at the statutory retirement age. Topping up your non-working spouse/parents CPF accounts will entitle you to have tax reliefs, so max these out if you are feeling rich.

11. Whole life insurance: Finally, you have sufficiently insured yourself from key areas of your life and if you still feel that you have "spare" cash in the bank that you want to insure more parts of your life, then yes, I will say that it's probably the right time to consider whole life insurance.

I bought my whole life insurance at 31 years old. I actually did not want to buy the whole life insurance, but the product that I wanted to buy ("female medical illness cover") was a "rider" for a whole life insurance plan. After doing my sums, I settled for the lowest plan that had $100,000 sum assured, so that I could buy the "riders". I ended up with other "riders", such as "waiver of premium", "early critical illness cover" and I cannot remember what else. It was also an investment-linked policy, which I did not like, but it came as a package. I did not like it that I could not choose what funds to buy because I did not meet some criteria about "financial knowledge proficiency" because I didn't have a finance degree, finance certifications or work in finance.

Argh! the regulations to safeguard consumers! In any case, I hope this will help you make an informed choice about whether to buy a whole life insurance.

Wednesday, December 3, 2014

How do I start investing?

Myth: A common myth when it comes to investing is that one needs to be rich, to be rich.

Premise 1: Rich people have more money (say $1M), so each time they invest, they earn a lot ($50k).
Premise 2: I don't have as much money as them (say $1k), so each time I invest, I earn very little ($50)
Conclusion: Therefore, I will not be able to become as rich as them.

Fact: Assuming you invest in the same stock as the rich person you are comparing with, you will get the same yield. In this example, we used 5% yield for illustration purposes. In terms of yield, you had made as good an investment as the rich person. Everybody starts somewhere, and little by little we will get there.

-----

Myth: $50 is too little and not worth my time, so I can't be bothered to invest $1k. I will invest when I have $10k.

Premise 1: The stocks that have good 5% yields are beyond my reach ($10k/lot).
Premise 2: I need to spend hours researching what to buy with $1k to get $50 which is not guaranteed.
Conclusion: Therefore, I will not bother to buy the penny stocks.

Fact: Everybody starts by learning baby steps. Starting with the lower-priced stocks also mean that any losses incurred would be lower in absolute terms. When you invest $1k, a 5% loss in capital is $50, whereas a 5% loss on a capital of $10k is $500. You lose more when you invest more, so start small to lose less, and most importantly, learn from these less expensive experiences.

-----

Myth: Rich people pay wealth managers to manage their money to become rich.

Premise 1: Rich people pay wealth managers to help them invest.
Premise 2: Rich people are rich through these investments.
Conclusion: Therefore, I should trust wealth managers because they know how to make money for their rich clients. Wealth managers should know more than me about investment because they invest for a living.

Fact: Wealth managers earn a living out of investors who are willing to pay 1-1.5% of management fees. Rich people probably earn more elsewhere than investing the money themselves, so they pay people to do the investing (which entails research, reading, calculating, monitoring prices, submitting orders, paying for orders, etc.) The rich people can afford it, but can you?

-----

How do I start investing?
  1. Decide on a fixed amount to set aside monthly and don't touch it. Schedule an automatic monthly fund transfer to another bank account and don't check on it until 6 months later. It's fine if the interest rates are low. It's really fine. You will lose more by spending it.
  2. Prepare for your first purchase by creating your CDP account and brokerage account. 
  3. Start reading up about how to read financial reports if you don't have a finance background.
  4. Read about Initial Public Offerings (IPOs). You can google for "singapore ipos" and read blogs to learn how people assess these stocks. These are the easiest to understand because the share prices are offered at fair values and purchase transaction fee is just $2. When you ballot, you will unlikely be fully alloted. There was a freak case of full allotment from EMAS Offshore Limited, and it is the one and only case I had noticed in the past 14 years of my investment journey.
  5. Add some stocks to your brokerage account watchlist to monitor how buy and sell queues work. Learn how to read the time and sale charts, historical charts, and observe correlation patterns between price and volume, and price versus Straits Times Index (STI).
  6. Set a target buy, sell, cut-loss price for the stocks you intend to buy, and re-adjust your valuation of the stock throughout the monitoring period.
Open your piggy bank after 6 months of studying and spend 50% of it to buy your favourite stock at your target price. Keep the other 50% as your opportunity fund (buy when the market crashes, which can happen anytime and you will never be able to time it).