Friday, March 2, 2012

Price Targets - Which comes first the target or the price?

I was looking at SmartMoney.com the other day, and I found an interesting page when looking at a stock. On this page were the last 50 upgrades / downgrades for the stock. It includes data about the firm publishing their opinion, the date, their price target, and an action. An example for Apple is available here:

http://www.smartmoney.com/quote/AAPL/?story=upgrades

In looking at this type of data, I've always been curious as to which comes first the price target or the price. As in do price targets follow a rise or drop in the price of a stock, or are stock prices actually influenced by the recommendations of an analyst? To help me look analyze this, I put
together a spreadsheet in Google Docs.

This spreadsheet has 3 different worksheets in it. Each of them are detailed below:

SmartMoney Worksheet

This worksheet makes the call to the Smart Money page. The call is made using the ImportHtml() function in cell B4. The url that is input to the function is a concatenation of the symbol and the base url for the Smart Money page. The results are then returned in columns B through G. In column H I then concatenate the data that I am interested in displaying in my Chart that will be on my Price Target worksheet. In column O I leverage a simple function where by I am calculating the average of the last 10 price targets. Again the purpose here is that I want to plot this as a simple moving average value in a chart.

Data Worksheet

This worksheet serves two purposes. The first is to access historical pricing data for the stock being analyzed from Yahoo Finance. This is accomplished by using the ImportData() function in cell A10 which is a concatenation of the base url from Yahoo Finance and the symbol being analyzed. We also pull in real time data from Yahoo which is being used in the header section of the following worksheet.

PriceTarget Worksheet

The PriceTarget worksheet is where the user specifies the symbol being analyzed in cell c2, and includes the Interactive Time Series google gadget. The data to be displayed in this gadget is pulled into columns H through L, which is pulled from both the Data and SmartMoney worksheet. The resulting chart shows the date as the x axis, price, price target, and moving average price target on the y axis. It also provides an overlay that displays the firm, their action, the resulting action, and the target price on the specific date.

One of the really nice features of this gadget is that you can filter the overlays that are displayed on the chart. So, if you just want to see price targets from UBS, you can set the filter accordingly. Same is true if you want to see just buy or sell actions. Essentially any text can be filtered on.

A screenshot of this spreadsheet is provided below / on the right.

One of the down sides I found of using the google gadget is that if the gadget is towards the top of your spreadsheet you can't see the menus of the spreadsheet as they always pop up behind the gadget. Same is true within the gadget itself. Also, I was extremely frustrated when trying to size the gadget appropriately as I got multiple errors when trying to resize the gadget. In the end I had to make multiple gradual size changes and it finally worked.

Now I can't say that I have answered my initial question, and I have a feeling the answer (as always) is going to be it depends. As in sometimes price follows price target, and other times price targets will follow price. But regardless it was an interesting exercise and hopefully provides an interesting example of how the Interactive Time Series gadget can be used in a spreadsheet.

This spreadsheet has been shared, and is accessible here:

https://docs.google.com/spreadsheet/ccc?key=0Aj8CeiznlFexdHdfN0ZqX0ptdFZ5dDNZSVhRUlBteUE

It is also available as a template here:


Scroll down to see the Price Target template.

As always, please let me know what you think.

Sunday, February 26, 2012

Portfolio Tracker - Usage Instructions (Google Docs)

Today I imported into Google Docs the Portfolio Tracker workbook that I created previously in Excel. The only thing I had to do prior to importing was to un-hide the columns in my transaction Log worksheet. Without doing this, there was no way that I could figure out of un-hiding them once they were imported. (From what I've tried you need to select the two columns that surround the hidden columns to unhide them. If your hidden columns are to the far right of your worksheet there is nothing to select, and hence you can't un-hide the columns.) Besides that, everything worked fine as I did not use any VBA functions as part of this workbook.

Anyways, I created this portfolio tracking solution for a couple of reasons:

1. The yahoo and google portfolio tools only appear to support equities and mutual funds, and as I write covered calls, I couldn't track the call options that I wrote.
2. I wanted to get the "full picture" for my trades by factoring in call options that I wrote as well as dividends. As a result, the Portfolio tracker that I created includes an "adjusted cost" which is the cost of my position after adding back in proceeds from dividends and call options that I wrote.

I've also included sample data in the tracker so as to provide a useful illustration of how the tool could be used to track transactions across your portfolios. If you're like me, you may have holdings in say an IRA, a 401k, a SEP IRA, and a taxable account. Tools like Mint.com are great for consolidating your account, but if they don't have access to all of your accounts, you can't get the full picture of your holdings.

Note: Next up will be the Portfolio Monitor which will allow you track the P&L of your holdings in real time. For now this workbook just lets you capture and track your transactions.

Instructions on how to use the Portfolio Tracker are provided below:

1. Open the workbook, then go to the Setup worksheet.
2. From the Setup worksheet, add your definition of Investment Types if they differ from what is already there. The Investment Types that you define here are then going to be available to you when you define your portfolio, and when you view your holdings by Investment Type in the Portfolio Monitor workbook. You can define up to 20 different types of investments.
3. Once done with Investment types, define your Account List. This will be the list of the accounts that you want to track. For example, 401K, IRA, Personal, UGMA and so on. This account list will then be on your pick list when you define your own portfolio.
4. Starting in cell H3 you can then begin entering the list of symbols that you have holdings in that you want to see carried over to the Portfolio Monitor workbook. What I define in here are only those funds, stocks, or options that I have a position in. So, not things that I used to own but no longer have positions in.
a. The Account column is for the account that the holding is in.
b. Symbol is the trading symbol for the instrument. (We get our pricing from Yahoo, so you need to ensure that the symbology you use is consistent with Yahoo.)
c. Underlying Symbol is for linking derivatives (options) to the underlying symbol. For example, if I owned options in IBM, I would specify the option symbol in the symbol column, and then IBM in the Underlying Symbol column. This is important if you want to perform “adjusted P&L” calculations.
d. Columns K & L are derived and used for lookups into the Transaction Log worksheet. Don’t touch these.
e. Column M is where you define the Type of investment. This is a lookup from the Investment Type list you defined above. This is used in the Portfolio Monitor workbook within the Holdings worksheet.
f. Columns N, O, and P are calcualated given the transactions that you enter on the Transaction Log worksheet. Do not touch these.
g. Column Q is for defining a “user price”. You would do this for securities or assets that are not understood by Yahoo. For example, I like to monitor my total net worth including the value of my house and other un-quoted holdings, so I use this field to specify the value of those holdings.
h. Column R is for defining the “Previous” price for this asset. Again, for things that are not priced by Yahoo, you can define a previous user price, so that your daily P&L calculations on the Portfolio Monitor workbook are accurate.
5. Transaction codes and their descriptions are provided in cell t3. These codes are used on the transaction log sheet. They can be over ridden in case you plan on uploading a list of transactions from your broker, and if they use different transaction codes.
6. The above only needs to be done once, except for step 4, which needs to be performed every time you add a new holding to your portfolio.
7. Next, open up the Transaction Log worksheet. The columns, and their usage is as follows:
a. TxID is a simple numeric identifier for a specific transaction. Ultimately, this may be used to specify what lot to sell, how ever for now it is reference only.
b. Date – The date of the specific transaction.
c. Shares – The number of shares that were transacted. These need to be positive if you buy shares, and negative if you sell shares or sell shares short. Additionally, this needs to be the number of shares in a contract if you buy or sell options. (So, 1 contract typically equals 100 shares.)
d. Security – The security that you are transacting in. This can be anything, but if you want to leverage the Portfolio Monitor sheet to monitor your holdings, then it should be a symbol that Yahoo Finance recognizes. (Again, refer to step 5 above if you want to see this security in the Portfolio Monitor workbook.)
e. Underlying Security – The underlying security for what you have traded. This is useful primarily for options, whereby the security is derived from the value of the underlying security. So, if you buy or sell an option in IBM, the underlying should be IBM.
f. Cash flow – This is the most important piece of this worksheet. If you get this right, then the P&L and holding calculations will be accurate. So, this is the total cash flow (in or out) for the transaction including transaction costs. So, if you buy 100 shares of DELL for 15 a share, with a transaction cost of $10, then your cash flow should be 1490. (100 * 15) – 10.
g. Price – The actual trade price for this security. (For now this is used primarily for reference purposes.)
h. Commission – How much you paid in commissions for the transactions. Again, this is used primarily for reference purposes, but could be summarized thru a report to figure out how much you have paid your broker over the years.
i. Account – The account that this transaction occurred in. This is linked backed to the account you setup above.
j. Cash Account – This is the cash account where the funds came out of to pay for your purchase, or where the funds went to when you sold your security.
k. Notes – Free text field for capturing notes about the trade. I typically cut and paste in the confirmations that I get in my transaction history from my broker. This field is reference only currently.
l. Portfolio Security, Portfolio/Underlying, Portfolio/Cash – These columns are derived, and should not be touched. They allow the transaction log to lookup and calculate the total holdings / activity in a given security in a given account.


In the Portfolio tracker are sample transactions that have been made that illustrate how you can capture and track your investment activities. The following describes each type of transaction that are provided (Note that I am referring to the row in the spreadsheet, and not the transaction ID):

Row 5 – This is the initial investment to fund my account.
Row 6 – Bought 300 shares of Dupont, total cash outlay after transaction costs was 11420.91.
Row 7 – Sold a October 2010 option with a strike price 0f $38 on my 300 shares of Dupont. Hence, the option symbol in the symbol column, and the underlying stock symbol (DD) in the Underlying column.
Row 8 – Bought 200 shares of IGD.
Rows 10-11 – Received dividends for my DD, and IGD holding. Note the use of Ca$h in the security column. This means that the cash received is going into the cash account. Also, by specifying IGD in the underlying will allow me to calculate an “adjusted cost” for IGD. So, an after dividend price adjusted cost. My broker does not provide that, and for dividend paying stocks I want to see both the real cost, and then the adjusted cost given dividends and/or premiums from option sales.

Other usage notes:

1. Use the filters on the Transaction Log worksheet in row 3 to view specific transaction types, securities, or transaction in a specific account.
2. Use the "Notes" column to capture free text about the specific transaction. This may include rationale as to why you made the trade.
3. Un-hide columns T thru Y to see the functions / calculations being used.
4. On the Setup worksheet a Position of 0 in column N, means that you have closed out that position. In this case column P will show you how much you made / lost on the trades relating to that security.
5. If you still hold a position column O will show you the cost basis give purchase / sales of the security, while column P will show you the adjust cost basis that factors in dividends received and premiums from options that were written.

This workbook is available here:

https://docs.google.com/spreadsheet/ccc?key=0Aj8CeiznlFexdG9ITlFUWnpZV2hiUzZ4ZU9uMkJQTVE

And is also available as a template here:


Look for the one entitled "Portfolio Tracker".

Saturday, February 18, 2012

Charting Dividend Stocks


Take a look at the following chart from Yahoo Finance. In it is a relative price comparison between SPY (SP500 Exchange Traded Fund) and CMO (Capstead Mortgage). What does it tell you? What it tells me is that the price of SPY has gone up nearly 25% over the past 2 years, while the price of CMO has gone up about 5%. If one didn't know any better, you would think that SPY was a better investment than CMO. What this, and virtually every other chart you see at Investing sites on the web is missing is the effect of dividends on your investments. Only after you factor in dividends and other corporate actions can you fully understand which of CMO and SPY was the better investment.


To study and demonstrate this I put together an Historical Price Comparison workbook through Google Docs. The following details the steps I went through to accomplish this.

Step 1 - Get Data and Perform calculations

I created a Data worksheet where all of my data access and calculations are to be performend. To get the requisite data, Yahoo Finance has a nice utility for downloading both historical prices for a stock as well as dividend payments details. A sample url for this data is as follows:

http://ichart.finance.yahoo.com/table.csv?s=SPY&d=1&e=18&f=2012&g=d&a=0&b=29&c=1993&ignore=.csv

The following are the parameters and their descriptions for this call:


s- symbol
e - end day
d - end month
f - end year
a - start month
b - start day
c - start year
g - optional parameter that you can use to request just dividends (g=v)

To access this data I leveraged the ImportData function in cell a2 for the first symbol, and in cell m2 for the second symbol. The url's that are leveraged in these function calls are built from the start date defined in the Historical Price Comparison worksheet as well as the two symbols that are defined there.

I leverage two additional ImportData calls in cells y2 and aa2 in order to get dividend information for the specified symbols. The results returned are the ex-date of the dividend as well as the dividend amount.

In order to build my comparison chart that includes dividends, I decided to define an initial investment amount (100,000) as the default, and then calculate how many shares that would purchase for me on the start date. On top of that I assumed that all dividends would be reinvested on their ex-div date. (Note exactly right as you would only be able to reinvest the dividends the day after the payment date, but hopefully close enough to prove a point here.)

In order to derive the initial and subsequent shares after reinvesting dividends, I leveraged the following function in column H (copied from cell h3:

IF($A3='Historical Price Comparison'!$H$1,('Historical Price Comparison'!$E$1/$E3),If(Isnumber($I3),($H4+($I3*$H4)/$E3),$H4))

What this formula does is the following:

if the price date equals the starting date, then the numbers of shares is equal to the initial investment value divided by the closing price. It also checks to see if a dividend was paid on that date, and if so it adds the reinvested dividends (in terms of shares purchased) to the number of shares that were held on the previous date.

To determine the div amount in column i I used the vlookup() function to pull in the dividend value from column Z or AB where the dividend date equals the price date.

The market value (column j and v) was calculated simply by multiplying the number of shares by the closing price for the given date.

I also calculated the market value without dividends applied in columns x and l by simplying multiplying the close price by the shares held, but the shares held did not include the effect of reinvested dividends. I did this so as to be able to compare the effect of reinvesting dividends on the market value.

Step 2 - Creating the visuals

The Historical Price Comparison sheet does nothing more than reference the appropriate cells in the Data worksheet, and then in turn graphs the results.

The graph includes four line charts for the two symbols. One line shows the market value with reinvested dividends, the other shows it without. The following is the result. As you can see, with reinvested dividends CMO was a better purchase than SPY.

When using this sheet you need to ensure that your start date is a valid trading date. So, no weekend dates and no holidays. (I probably could have put the validation logic in there, but, figure my time is best spent else where.)


This spreadsheet can be accessed here:

https://docs.google.com/spreadsheet/ccc?key=0Aj8CeiznlFexdEVrLXlQLTdTUF9HOGgwd1UyTnJMM0E

You can also search for it in the template section here:


Take a look, and let me know what you think.



Monday, February 13, 2012

Company Overview - Google Docs version



Previously I spent some time using the SMF Addin to create a "Company Overview" workbook. This workbook pulls in financial data, time series (price history) data, and news headlines from Yahoo Finance and is available here:

http://www.toteboard.net/ - then there is a link on the right hand side for the Excel version of the Company Overview

Given my new focus working with Google Docs Spreadsheet, I figured I'd see if it was possible, and if so, how difficult it would be to replicate this workbook from Google Docs. The following are the steps that I went through to accomplish this.

Step 1 - Replicate the Data sheet.

As part of the Company Overview workbook, I leverage a "Data" worksheet as a mechanism for pulling in data from Yahoo Finance. In my Excel version, I leverage a function defined in the SMF Addin (RCHGetYahooQuotes)to pull in CSV data from Yahoo Finance. Given a series of paramters, this function makes a call to download.finance.yahoo.com to pull in financial data for a specific company. For example, the following URL is leveraged in this sheet:

http://download.finance.yahoo.com/d/quotes.csv?s=EFA&f=snll1cc1t7va2bapomwj5j6k4k5ers7r1qdyj1t8e7e8e9r6r7r5b4p6p5j4m3m7m8m4m5m6k1b3b2k2c6c8&e=.csv

Take a look here to get a definition of the fields that are provided thru this function:


The nice part about Google docs is that you can leverage the ImportData function to pull in this data. So, no custom function is required to pull in csv data. To pull this data into the data sheet, I've concatenated the base url, the symbol for the company, and the field list together in cell c4. I then use the concatenated values from cell c4 as the input parameter to the ImportData function in cell h8. I put it there to replicate that same starting position as in my Excel version. The result of my function is a list of data items beginning in cell h8 going thru cell BE8. I then cut and pasted additional calculations into cells BF8 thru BN8. (NOTE: Some of these functions that worked in Excel threw errors in Google Docs as numbers coming from yahoo finance as say "+5.15" were treated as strings, while in Excel they were correctly treated as numbers.) Values like -4.53 were treated correctly as numbers. To address this issue, I had to use the following: value(substitute(M8,"+","")). This simple function replaced the + sign with a null string, and then treated the resulting set as a numeric value. I had to do this for any function that could return a positive number.

The next set of data that I had to move over were the calls to get the historical prices so that I could create a price chart. To get pricing data, the following url is called from Yahoo Finance:

http://ichart.finance.yahoo.com/table.csv?s=EFA&g=d&a=10&b=5&c=2008&ignore=.csv

To simplify this, I just hard coded the start date, but I build the url give the symbol currently being selected (this is done in the Data sheet in cell H36). Again, the ImportData function is used in starting in cell H38 to pull in this data. I then do simple cell referencing in columns O and P to simplify the charting of the data.

The final data set that we need to pull in is a list of headlines for the selected company. In my Excel sheet I leveraged the following url:

http://download.finance.yahoo.com/dnh?s=DUK&n=20

But in the Google Docs version I switched this over to leverage an RSS feed from Yahoo. The url for this is defined in cell B35 of the Data worksheet. Example as follows:

http://feeds.finance.yahoo.com/rss/2.0/headline?s=EFA&region=US&lang=en-US

In this case, the ImportFeed() function was leveraged in cell B38 of the data sheet using the above url as the input parameter.

Step 2 - The Setup worksheet

One of the things I like to do, on top of having a worksheet dedicated to data, is to have a setup worksheet. The intention here is to provide a place where the user can go to "setup" their specific options for the workbook. In my Excel version of this solution there was not a whole lot there, but in the Google docs version I wanted to provide the user with the ability to see the relevant data and labels in the language of their choice. To accomplish this I defined each of the labels that I was going to use in the "Company Overview" worksheet in column B. So, these were the English abbreviated versions that I wanted to display. I then spelled out each of this labels in column C, with the intention of using these as an input to the GoogleTranslate() function. Column D is where I leverage the GoogleTranslate() function. Input to these calls are the labels defined in column C, and then the language as specified by the user in cell C2. The resulting translations were then returned in Column D. I then have simple function in column E that uses my abbreviated labels from Column B if the language is in English, else it uses the translated values from Column D. The value here (as you will see on the Company Overview sheet) is that the user can get the labels in the language of their choice. Now, I have no idea how good the translations are, but if they are close, I am hoping that this will be good enough.

Step 3 - Build the display worksheet

The final step is to build out the display of the data on the Company Overview sheet. Now this differs a bit from my Excel version, but the concept is the same. The difference is that I leverage the Setup sheet to get the translated labels for the display. The actual data is referenced in exactly the same way. (Note: To speed the building of the Google Docs version I tried to cut and paste the functions from my Excel workbook. I had a problem though when trying to cut and paste multiple cells at a time as the cell referencing got messed up. To work around this I cut and pasted a single cell at a time.) For display purposes, I repeated the steps to remove the "+" sign from postive numbers.

For the Headlines section I leveraged the Hyperlink function to allow the user the ability to click through to the story matching the headline.

For charting of the pricing I leveraged the Interactive Time Series gadget. One problem that I found though was that when trying to print the worksheet, this gadget anyways was not printed. As a result, I created a simple time series chart and placed it behind this gadget to support the printing use case.

That's about it.....all told it took maybe 3-4 hours to move this over. Good news is that I probably was able to carry over 90% +/- of the functionality that I had in my Excel version. Then, on top of that I was able to add in the ability to provide a localized solution on the fly. So, if English isn't your first language, via the Setup worksheet you can change the default text language on the fly. (Note: I could probably get closer to 100%, but in the end, it was good enough.)

The end result in Chinese is displayed below:


You can sample this spreadsheet at:

https://docs.google.com/spreadsheet/ccc?key=0Aj8CeiznlFexdGctenNmdlctSGpxNUdZLWk5OUlZV3c


or you can leverage the Company Overview Template here:


Finally given what I experienced, if I could......, I'd make the following suggestions to the Google team to improve the spreadsheet application of Google Docs:

1. Fix the cutting and pasting of formulas from Excel to Google docs.
2. I tried importing my Excel document, but this failed, so I had to do it worksheet by worksheet, and then cell by cell.
3. Provide the ability to protect an entire sheet, except for a specific cell. Ideally the template would be entirely protected, and all the user would have the ability to change would be the symbol they type in to cell c2, and the language they can select in the Setup sheet.
4. Provide for the ability to hide column and row headings. You can hide everything else, so why require that you always see A, B, C, .... and 1, 2, ,3 etc. Without this and with everything else hidden you may not know that this is a spreadsheet template.
5. I had problems when trying to pull in 10 years worth of price history data. The spreadsheet stated that it was "working" but it never seemed to finish, although shutting down and restarting the browser, and coming back to the workbook everything seemed to be saved correctly.
6. It'd be nice if there were a series of UI controls like combo boxes or list boxes that you could use. The data validation function that I used for the language is a close approximation to a list box, but other controls would be extremely useful and would provide for a much better UI.
7. Gadgets should be printable if at all possible.



Saturday, January 28, 2012

This posting is about the creation of my first data sheet. I'm thinking to keep things organized that I should create a folder for all of these things, so that they're all in one place.

Creating the folder was pretty easy, as all I had to do was to click on Create and specify "Collection". The following screen shot illustrates this:


I created a Data Sheets collection or folder, so that's where I'll be putting all my worksheets that access data from various sources.

Going to start simple, so the first thing that I am going to do is to create a data sheet that provides access to the GoogleFinance functions. I realize this is very easy to do within a sheet, but doing it once and sharing it with my workbooks should save me time in the future.

The syntax for accessing the GoogleFinance functions is quite simple for stocks: =GoogleFinance("symbol"; "attribute");

So the key is you need to know the attributes, and the symbols that you can use. The list of attributes is available here:


There is also a list of attributes available for historical data, and for funds. So for now, my data sheet will be focused on providing access to just equity related attributes.

I cut and pasted each of the attributes into the data worksheet, as well as the description for the item. I have also included a label column for both the attribute and description so as to be able to provide a localized label to the consuming workbook given language as an input.

To do this, I've included a GoogleTranslate function, that takes the text to be translated, from language, and to language as an input. Trying to figure out what should be used as the "to" and "from" parameter, and the help text tells me I need a valid ISO-639 language code. I found a list of them here:


that appear to work. In practice I'm going to assume that cell d1 accepts a valid language code, so validation will need to be done prior to linking this data sheet to another workbook. I've also hard coded the English labels for some of the attributes as code values like "PE" and "EPS" did not translate to different languages.

To make cell referencing easier in the workbooks I create in the future, I defined names for each of the various cells. This way when accessing this worksheet from another, you can reference the name of the cell rather than the row/column. Point being referencing "price" is much cleaner and more intuitive than referencing "c4". The following screen shot illustrates how this was done. The UI was a bit painful, and will have to evaluate whether this is worth the pain for large data sets, but ...we'll see.




In hindsight, not sure how much if any time this will save me, as it is just as easy to define the function as it is to reference a cell, but oh well. In the long run it may give me a consistent interface with the other Data sheets that I plan to create.

Anyways, 30 minutes or so later, and we're all done. I've saved this worksheet in my Data Sheets collection, and it is available here:


I was hoping to share / embed this into the blog, but couldn't figure out how to do it. The documentation I saw didn't jive with the options I was given from within the workbook.



One more time.....Google Docs Spreadsheet

OK, it's been about two years since my last post, so looking to add these things a bit more often now. This time around though, for say the next year or so, I'm going to focus on just using Google Docs Spreadsheet. (Step 1 for Google is to come up with a catchier name.) I've always said that Microsoft Excel is the "great equalizer" in that it allows us semi capable technologists the ability to create tools / applications that come close to rivaling applications created by the super geeks. It also gives others the ability to "tweak" it to their liking. Something that is not possible with online solutions. Question now is whether Google Docs Spreadsheet is ready for the prime time.

Anyways, having switched to Google Chrome nearly two years ago (never once regretting it), figure it is time to cut the cord and see if Google Docs Spreadsheet is any where near Microsoft Excel. I'm guessing no, but key question then will be is it good enough, and if not what needs to change so that it is. Again, what interests me are the gadgets (that can be shared onto iGoogle), on the fly translations, the data retrieval tools, and the online nature of the tool. As in, being able to provide access to my spreadsheets from virtually any device opens up a huge user base. Yes Microsoft has an online version of Excel, but it's pointless if you can't leverage VBA. (I don't think you can, but someone correct me if I am wrong.)

In looking at the spreadsheets I have done in the past, you can break each of them down into 3 parts:

- The visuals / display
- Calculation / business logic
- Data retrieval

As I start my journey I'm thinking that I'll step back and try and do this the right way this time. So, I'm going to focus on a few things out of the gate. Specifically, I'll be defining and creating the visual experience that I want (think CSS in html terms) in terms of a series of front end or visual templates for my workbooks. So, defining color schemes, fonts, screen layouts, etc.

On top of that, and probably more importantly, I'm going to focus on creating a series of "data" worksheets that can be used / accessed to provide access to various data sets.

Finally, I'll determine whether I need to define a separate set of calculation worksheets that manipulate data from the data sheets for display usage by the visual sheets.

In general, experience has taught me.....focus on getting the data, doing any required calculations and only then focus on the visual experience for the user. So, step 1 is to create a series of data sheets that I plan on using. As my interests lie in fantasy sports (especially baseball) and investing, my first plan of attack is to create a series of data sheets that provide access to that content.

Tuesday, December 22, 2009

Stock Screening in Excel

Just finished creating an Excel based stock screener. The screener leverages content from http://www.finviz.com/, a truly phenomenol site for investing content, and allows you to leverage the power of Excel by enabling you to filter on each column in the screener. Approximately 80 columns of data are available, including real time price and volume data. See the results and impact of your filter changes immediately. The workbook also allows you to calculate Market Cap weighted aggregates at the industry and Sector level off of the same content that you can screen on. As a result, when you're done screening you can compare your results to aggregate values at the sector or industry level.

Looking ahead, a future version will include bubble and or scatter plots on variations of content allowing you to see visually where the outliers are, as well as conditional formatting of "good" and "bad" values, and possibly multi factor rankings across the data items allowing you to "score" the best investment options. Take a look, and let me know what you think:

http://www.toteboard.net/Models/ZipFiles/StockScreener.zip

Note: This is a rather large file, and the aggregate calculations are quite "expensive" in terms of CPU time. So, have a little patience when opening, and be warned about the possibility of locking up Excel for short periods of time. I tried, so I recommend against calculating aggregates for all the sectors and industries in this workbook.