Trade Ideas for 5/13/2008

Short Squeez ? Short Interest Ratio DSC, Signal -> Triangle Asc

CXR CRVL DNR TMTA CLDN  IHS

scRubyt Tutorial: Dogs of Hang Seng Index

Inspired by a scRubyt Tutorial: Dog of FTSE posted on straws-dog. Guess it’s time for me to give it a go!

This should work on all the Index, Dow Jones, NASDAQ Qs….

So here’s the paste of the code. The idea is very similar to Dog of FTSE, except this uses the intelligent learning feature of scRubyt instead of the straight XPATH. This feature of scRubyt is especially useful when it is used on a well-element-classified (don’t know how to phrase it) site like yahoo finance.

#
# Dog of HSI written by Houston Ng

require ‘rubygems’
require ’scrubyt’

# Initialize an empty hash for final data
final_data={}

# Extractor 1: Get an update symbol list of HSI from yahoo finance
hsi_list = Scrubyt::Extractor.define do
fetch ‘http://hk.finance.yahoo.com/q/cp?s=%5EHSI’
top “//td[@class=’c1′]” do
symbol “//a”
end
end
hsi_stocks = hsi_list.to_hash

# Extractor 2: Get the stock information, just modify the pattern learner
hsi_stocks.each do |hsi_stock|
sc = hsi_stock[:symbol]
stock_data = Scrubyt::Extractor.define do
fetch ‘http://hk.finance.yahoo.com/q’
fill_textfield ’s’, sc
submit

#For the div with id, stock bar,
#get the content inside h3, the first and second b tags
#This only works for HK finance
top “//div[@id=’stock-bar’]” do
name “//h3″
price “//b[1]”
change “//b[2]”
end
end
#Save the stock data into the final data
final_data[sc] = stock_data.to_hash
end
# Print out the final data, basically just puts out the hash on screen
#The example is just spitting out the name for simplicity
final_data.each do |key, entry|
puts “\n#{key}”
entry.each do |datapair|
puts “#{datapair[:name]} | Price: #{datapair[:price]} | Change: #{datapair[:change]}”
end
end
I know I can just get everything from the same page I got the HSI symbol list. But Just for fun to play with auto-fill in. I load the actual quote page.

There is however, a slight pitfall that my little brain needs to work around. If you notice the output, there are two empty hashes. They are from the HSI list grabbing. It grabs too many cells, that it grab the header cell but since, the header cell does not contain any <a> tags, it return an empty value. This will be next improvement of the code…

Here’s the source code Dog of HSI

Dog of the Dow coming soon….

Tags: , , , ,

Just like cooking Italian for the locals

Generating ideas for non-English speaking areas is a much simpler thing. One can almost copy what’s out there and as long as keep the idea straight it will work. But there is one catch, make sure it suits their tastes. Don’t make it authentic Italian food , make it “you-think-it’s-authentic-but-it’s-modified-to-suit-your-taste” authentic Italian food

Bad Site Design: KFC Hong Kong

Websites in Hong Kong are littered with Flash only. That, well, only flash enabled computers can read… Sadly my iPhone’s Safari is not one of them.

So the story was that I got this KFC craving today. When I go to this KFC (or, was) in Central, I was bumped to found out that it’s been replaced by a cosmetics shop. I then took out my trusty iPhone and wanna look for an alternative location. Got on to KFC HK site and what happened? This…

Fancy flash is definitely old, slow and not for people on the go. Where is the accessiblity!?

But I stil want my KFC!

Tags:

Testing CSS accessiblity on a Mac

Well Mac has been a great friend from a developer point of view. I don’t think there are too many objections to that. The problem a web designer face is the pain in butt issue in IE both 6 & 7 (probably 8 too, haven’t tried the beta yet tho). And yes I know this page’s header is not working too well on IE but I haven’t got a chance to work on it yet

Well, Thanks to Apple switching to Intel. We have parallels, which leads to IE6 or IE7… depending which one which one you’ve installed and there can only be one installed at the same time humm…

Here’s the solution.

I just found out how you can install all the IE from 3.3 to 6 all in a nice package HA!

Multiple IE from Tredo Soft

Code Versioning for startup

Code management is probably the top priority of any software development startup. So this is going to be an ongoing post to keep track of what’s out there

  1. SVN. Used to use it back at my old aero company. It’s great but the code pretty much sits in the companies’ server. That was the old day.. Anyway, There are tons of these online hosting too! There are, Unfuddle and Assembla
  2. GIT. New “IT” thing for the Web2.0 community. And now it’s much cleaner and simpler with the new GitHub repository service. Now code can stay online and shared anywhere! Great! Pricing is not too bad for a startup too like $7-12/month. Umm… sound like I need to get an account there… wait I don’t have any code nor collaborators…. well versioning is still a good habit

Money saving guide for startup

More useful tips on startup from industry veterans. original post

Here’s a quick recap of THE list with a little Hong Kong/Chinese flair:

  1. Buy Macs. Genius Bar & Applecare is your IT department
  2. 2nd monitor for everyone. Time-saver= money-saver. A $300 Dell monitor rotated vertical is a programmer’s best friend
  3. Buy everyone lunch four days a week and have a no-meeting policy. Lunch meetings save time. (Comment: )
  4. Get cheap tables but expensive $500 chairs . Workstations are over-rated but comfy chairs make workers happy.
  5. No phone system except admin staff. IM is the thing
  6. Rent out all the extra office space. (Comment: Probably irrelevant in HK because of tiny offices )
  7. Outsource HR and account dept.
  8. Microsoft Office is expensive so install only on a few and use Google Doc for the rest
  9. GMail is your email server. It’s free 
  10.  Give a home computer to workaholics so that they can work from home. (Comment: What about MacBook pro for them?)
  11. “Fire people who are not workaholics don’t love their work” (Comment: Can’t phrase it better that. But he is right. People are expensive so you need the most passionate people)
  12. Get expensive espresso machine. Starbucks at the office saves valuable resource time
  13. Stock sodas for everybody. Again, make them happy and you save time
  14. Flexible work hours. Commute is energy wasting and time consuming.
  15. Go to your vendor every 6-9 months and ask for discount. 
  16. HR with linkedin and Facebook
  17. Get PR consultant based on projects instead of contract-based
  18. Outsource to middle America (Comment: for HK, Outsource to China, we have 11 billion talented people that cost half as much up North. Use them!)
More HK specific Ideas
  1. Cheap locations are everywhere. Tons of old aging industrial areas are cheap and huge
  2. Use Mainland staff. Just to make sure they are actually helpful. Talents in China can be sketchy sometimes and work culture is very different.

Book Review - 25% Cash Machine by Bryan Perry

Title: The 25% Cash Machine : Double Digit Income Investing

Author: Bryan Perry

Publisher: John Wiley & Sons

Just finished another book on investment. I picked this one from the book store because I am pretty much tired of all the rest out there. there are only 2 types, either Buy-and-Hold Mutual Fund or Day-trade stock picking. Not that I am against them, it’s just that they are boring! They are all the same and all derived from books that are 100 yrs old!

Here comes 25% Cash Machine. This book is all about finding high-dividend stocks with potential growth value. It’s not completely a buy-and-hold. You need to constantly on a lookout for market trends and changes. Be prepared to move out and ride on another one. The strategy is to ride on the best growth potential stock while maintaining >10% dividend. That is all it is about. It goes on explaining the whole high-dividend stock categories out there. Man, there are truly a whole boat load of these stocks out there and they are all 10% per year! To name a few super stars:

  • Penn West Energy (PWE) - 13.20%
  • Pengrowth Energy (PGH) - 13.20%
  • Harvest Energy Trust (HTE) - 14.70%
  • Frontline Ltd (FRO) - 15.00%
  • Terra Nitrogen (TNH) - 11.90%

These stocks are not only giving out large divs. They are also growing and appreciating. So here’s the plan, I am going to try build a portfolio again this year based on this strategy. Let’s see how I perform next year!

36 Startup Tips

Such a great resource with tips for tech startup. Man, I need this badly!

Almost want to print it out and nail it on the wall

Link Here