Friday, February 25, 2011

Code for Google Docs Portfolio

In addition to the yesterday's post, I'm publishing code. Use of code is free and unrestricted.


function colortickers() {
  // Color background of ticker columns depending on price and limits
  var price = 1;     // this will hold the answer
  var sheet = SpreadsheetApp.getActiveSheet();
  var row = 2;
  while (price > 0) {
    price = sheet.getRange(row, 2).getValue();
    if (sheet.getRange(row, 2).getValue()) {
      price = sheet.getRange(row, 2).getValue();
      var low = sheet.getRange(row, 3).getValue();
      var high = sheet.getRange(row, 4).getValue();
      if (low > 0 && price < low) {
        sheet.getRange(row, 2).setBackgroundColor("red");
      } else if (high > 0 && price > high) {
        sheet.getRange(row, 2).setBackgroundColor("lightgreen");
      }
      else {sheet.getRange(row, 2).setBackgroundColor("white");}
    }
    row++;
  }
}


function gettickerprice(ticker) {
  // Function to get current price of stock
  var price = 0;     // this will hold the answer
  price = FinanceApp.getStockInfo(ticker).price
  return price;  // return the answer to the cell which has the formula
}

Thursday, February 24, 2011

Managing Portfolio with Google Documents

Last week I had a very unpleasant surprise. I use Yahoo! Finance quite extensively for portfolio management. One of portfolios is set up as a shopping list, with low and high limits set. Very useful feature, you can see at a glance which stocks are trading outside of set limits.
Last week, Yahoo! completely changed portfolios layout. Among other changes, the ability to set and see limits was completely gone. I was outraged, a lot of my work just disappeared. I submitted complaint to Yahoo! and probably was not alone, because couple days later old portfolios layout was returned, and all my limits with it. But this made me think: what if by some whim of somebody such thing happens again?
Here comes Google Documents. There is a whole lot of possibilities for investment management there, and I am just scratching the surface.
Here's the link to the simple portfolio spreadsheet. Columns "Ticker", "Low Limit", "High Limit" and "Notes" are entered by user. Column "Price" is a function based column. Function "gettickerprice" reads current stock price from Google Finance. Price quote is delayed, as per Google Finance rules. Another feature of this spreadsheet: tickers are painted red if price is below low limit and green if price is above high limit. This work is done by script "colortickers", which is also a part of this spreadsheet.
This spreadsheet is public read only. You can (probably) copy it into your own Google account and modify as you wish.
I'm still working on synchronization of Yahoo! Finance shopping list portfolio with this spreadsheet. Not sure it's possible, but we'll see.

Seeking Alpha Certified

Wednesday, February 23, 2011

Opening ARM Holding

This is the company which was always more expensive than I wanted to pay for it. I was wrong so far, it was growing like crazy. ARM holding (ARMH) designs processors used in the most smart phones, including iPhone, and also in the most touchpad computers, including, of course, iPad. Company doesn't produce chips, which allows it not to spend huge fortunes on chip fab facilities. For comparison, Intel (INTC) currently spends about $15 billion to build 22 nanometer fab. ARMH licenses CPU designs to other companies. With the explosion in smartphones production, ARMH sells more and more licenses every month. Valuation is pretty steep, current P/E is just under 100, but I think company can see several years of explosive growth ahead.
That's why I started ARMH position today, on the second day of Libya related panic. I don't see any dependence between Libia and ARMH, so it looks like a good entry point.
Of course, I'm kicking myself for not buying it at $10 (was thinking about it at the time), but better late than never.


Seeking Alpha Certified

Tuesday, February 22, 2011

Buying Panic

Panic today on Wall Street. People are worried about Libya. I am not much worried about Libya, so I decided to do a little buying. Maybe I am wrong, maybe I am right, time will show.

Added to positions:

Google (GOOG). I was looking for a good entry point after last quarter report, and capitulated. Company is just too good. And Larry Page as a CEO is exactly what this company need.

Indian Fund (IFN). Technically, India was bottoming last couple of weeks. Today is a good entry point. If I read risks right.

Main risk is that panic will be much deeper this time. I can live with it, there is some cash to continue buying if market drops lower.

Seeking Alpha Certified

Monday, February 14, 2011

Brent/WTI Spread: It's Crazy

I mentioned what I thought then big ($4) spread between Brent and WTI futures here. It was 3.5 months ago. Today's spread is whopper: over $16!

Obviously, this spread has nothing to do with real product supply/demand. Difference between Brent and WTI processing is around $1, and usually it's easier to process WTI. So the only explanation for the difference is supply/demand situation on the futures market. It's not about oil, it's about paper. The question is, why Brent paper, traded on ICE, is much more expensive than WTI paper, which trades on Nymex. I don't have an answer, but there are several ideas which require additional digging.

Idea 1: CFTC started enforcing wash sales rules. In futures world, wash sale is a sale, where buyer and seller are essentially the same entity. This is going on for years, many countries with national (i.e. government owned) oil companies also set up sovereign (again, government owned) investment funds in US, which invest, among other things, in oil futures. It would be a good idea for CFTC to stop such activities, by I've seen no proof that it has any intention of doing that. If it were true, sovereign money could move to ICE, which is governed by British law. Variation of this idea: volume of wash sales sharply increased lately on ICE, without much change in US.

Idea 2: Oil futures suddenly became popular as an investment class in Europe. This happened not long ago in US, right now money is moving to the stock market. Maybe in Europe process of investing in commodities future is just starting? It's very hard to find any information supporting or disproving this idea.

Maybe there are some other ideas out there?

Seeking Alpha Certified

Wednesday, February 9, 2011

Opening RadioShack

Opened position in RadioShack (RSH) today. This is mostly technical trade.

Technical indicators:

Stock trades more than 20% below 200-day moving average.
Stock crossed over 13-day moving average yesterday, and stayed above today, indicating uptrend.

Fundamentals. I don't usually buy stocks with bad fundamentals, no matter how good technicals are. RSH is profitable company, with single digit P/E and projected growth. Good enough.

Seeking Alpha Certified

Monday, February 7, 2011

Closed PCAR

Closed Paccar Inc. (PCAR) position today. I've got nice 1.5% profit in one trading day, good catch. From the beginning, it was just a trade. Multiple signals (almost 10% drop after good quarterly report, 4x2 buy signal, which mostly doesn't work anymore, technical bottom signal) pointed to possible profitable trade, and trade I did.

Seeking Alpha Certified

Friday Feb 4 Trades

Bought Paccar (PCAR), added to Pepsico (PEP) position. PEP is trading at the bottom of current trading range, PCAR dropped way too much after good quarterly report.


Seeking Alpha Certified