Monday, November 06, 2006

Quote of the Week

"Implied volatility is based on historical volatility, but who cares about historicals? They're irrelevant. The point is, things can happen for the first time that aren't in your distribution so they can't be priced. If it's never happened before, how can you hedge yourself? The only way to hedge the unknown is to cut off tail risk completely." -- Jim Leitner from the interview in Inside the House of Money

MT

Sunday, October 29, 2006

Quote of the Week

"All these years I had been sustained by an illusion - happiness through victory - and now that illusion was blurred to ashes. I was no happier, no more fulfilled, for all my achievements.

Finally I saw through the clouds. I saw that I had never learned how to enjoy life, only how to achieve. All my life I had been busy seeking happiness, not finding it." -- Dan Millman's character in the Way of the Peaceful Warrior.

MT

Thursday, October 19, 2006

Quote of the Week

"In times of change, learners inherit the Earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists." -- Eric Hoffer
Sorry everyone for the lack of posts or response to emails.  I'm trying to meet a November 1st deadline for a new trading system.  And between that and the entire family being sick from a nasty little cold bug...well I haven't been up for much else.

I do appreciate your patience...and hope to get back to the normal routine soon.  In fact, once I push this trading system to production...I plan on taking a nice long break from the trading system turret.  Catch a few breaths before my next run.  Ha ha!

Until then, hop on over to the StockTickr Blog and read Jon Tait's interview.  One of the best interviews yet from StockTickr.  Jon's a smart cookie and shares some great insights into system trading and market behavior.

Later Trades,

MT

Tuesday, October 03, 2006

Quote of the Week

"Many questions are unanswerable.  Many answers are questionable."  -- from a fortune cookie
Wow, the above quote is so true.  I have dug a little deeper into everything I have worked on the past several years.  Calling into question my beliefs and attitudes towards the market.  I was so wrong.  It all started from a seed that Eric Crittenden planted into my head.  "Sounds like an exercise in curve-fitting", he said, in reference to one of my system ideas.

Then a friend introduced me to the concept of focusing on what you don't like to do and casting it aside in order to free yourself for the things you do like to do.  The butterfly began to flutter...
"It has been said something as small as the flutter of a butterfly's wing can ultimately cause a typhoon halfway around the world." - Chaos Theory
Next, I watched the recent show on Sabermetrics where they discussed Bill James and many of the very cool things brought out in Moneyball.  Flutter, flutter.

Finally, my recent foray into the hazards and pennywinks of developing a trading platform has brought out a very interesting focus to my trading.  What would I like in a platform?  What am I really trying to test?  How is a certain test helpful to my bottom-line?

And all that has helped me to understand what I've been missing.  I've been focusing on the wrong thing!  So much of my time was spent on my next trade.  Kinda like in Sabermetrics where they found too much focus was on RBI's or Homeruns.  Bill James found Outs was where the focus should be. 

And I think in trading...the focus should be on the only fixed rule that I know exists:  If you don't use margin...your losses are limited to 100%.  But, as long you don't cap your profits in any major way...your gains are infinite.  With that in mind, where should your focus be?  And what kind of formulas and tools can we use to measure this new focus?  For example, the smoothness the Sharpe Ratio tries to show becomes something of a throw-away...a tool/formula used to measure the wrong focus in your trading.  Don't understand?  Maybe this will help.  Or maybe not:
http://www.fooledbyrandomness.com/0603_coverstory.pdf

Later Trades,

MT

Friday, September 22, 2006

Quote of the Week - Kaizen

"The most important choice you make is what you choose to make important" -- Michael Neill
I had coffee with a friend today that brought up an interesting topic. He said, instead of thinking about all the things you like to do or would like to do and persuing them. Step back a moment and think about all the things you do not like to do...and stop doing them. A lot to chew on for yours truly.

First off, because it is very hard for me to think about what I don't like to do. Perhaps because I've spent so much time and effort in determining what I like to do? Or maybe I don't like to admit there are things I don't like to do?

Reminds me of Kaizen. Eliminating activities that add cost and do not add value in an effort to continuously improve. We could all use that, right?

So, here I am thinking about what I don't like about investing/trading.
1) I don't like nothingness. I don't mind drawdowns...at least something is happening. And of course, I love when I'm reaching new equity highs. But, I absolutely abhor nothingness. That period of time when your investments just sit there and do nothing. I don't like that. Which is a bad thing...since most of an investor's time is spent in nothingness.

2) I don't like gut feel investments. I want a precise method to follow that lets me know exactly when to buy and when to sell. Thus, the reason for developing trading systems.

3) I don't enjoy buying and selling stocks. I enjoy researching trading ideas and building systems around those ideas. But, the actual buying and selling of stocks is not fun for me. Would enjoy things much better if someone else traded my systems, so to speak.
That's about it as far as my dislikes. Not too bad. One day I need to write what I like about investing/trading.

Trading Platform Update:
I've made lots of progress on the trading platform front. But, so much still to go. I'm spending equal time in Python and Ruby in this quest. My major roadblock right now is obtaining the most efficient way to process historical stock data against portfolio data.

Most trading platforms process a symbol at a time. But, doing that prevents you from ranking all stocks triggered for a given day along with the currently held stocks and choosing the top 10, 20, etc. Because you'd have to read all symbols and all dates in order to get at a certain date for all symbols.

So, I'm trying date processing instead. Spin through all the symbols for a given date instead of all dates for a given symbol. Doing this would enable me to rank, adjust, etc. prior to the next day of trade. But, going this route scares me due to performance issues. Maybe it won't be so bad. We will see.

If anyone has ideas on this subject, please send my way. The main goal of the project is to avoid memory intensive methods. The reason? The trading systems I work with consists of all stocks in the US Markets going back 20 years or so. It crashes Wealth-Lab due to its memory method of position sizing despite 2GB of memory. I could buy more memory, but that would be too easy. :-)

Later Trades,

MT

Friday, September 08, 2006

Quote of the Week - Dilbert?

"I'm a great student of successful people, and usually at some point in their careers, they've had to take a huge risk. That used to cause a dull ache in my stomach. I still get it, but now I ignore it." -- Scott Adams, creator of Dilbert
MT

Fall Movies

Wow, there is nothing like Fall movie lineups to get you going.  And this season looks to be a good one.  Here's just a few of the movies that caught my eye and will likely see...

We Are Marshall & Facing the Giants - Nothing like football movies in the Fall.

A Guide to Recognizing Your Saints - Returning home again?

The Departed - Good Cop?  Bad Cop?

Fearless - Jet Li...Martial Arts...need I say more?

Enjoy the weekend!

MT

Wednesday, September 06, 2006

Quote of the Week - Mindsets

"Often when you mention risk, what people think of is the downside. Danger. That's not the entrepreneurial mind-set," she said. "The entrepreneurial mind-set is that risk is the heightened probability that there is a big range of possible outcomes." -- Heidi Roizen

The above quote is from Money.com's recent series on What it takes to be rich. I love the story describing growth mindsets versus fixed mindsets.
Dweck, the psychologist who studies growth mind-sets, created an experiment to demonstrate how persistence and the pursuit of knowledge leads to success. She posed a series of trivia questions to a group of people with fixed mind-sets and another with growth mind-sets.

After each answer, one and a half seconds passed before the participants were told whether they were right or wrong, and, if they were wrong, another one and a half seconds lapsed before they were given the correct response. Their brains were monitored with electrodes the entire time.

Dweck found that the people with fixed mind-sets cared a lot about whether they were right or wrong but not at all about what the right answer was. The growth-mind-set participants stayed interested until the correct answer was given, showing an interest in learning new information rather than in simply validating their intelligence.
more from Carol Dweck...
People with fixed mind-sets believe that they were born with a certain amount of intelligence, and they strive to convince the world of their brilliance so that no one finds out they're not actually geniuses.

Growth-mind-set people believe that intelligence, knowledge and skill need to be "cultivated" by trial and error. Failing at something, they believe, is the best way to ensure they'll succeed at it the next time.
This growth mindset versus fixed mindset sounds so interesting...I just might have to go out and read her new book:


Follow along with the Money.com's series here...
Lesson 1: Make your own luck
Lesson 1, Corollary 1: Building 'social capital' often pays off in the end.
Lesson 2: Failing at something is the best way to ensure success at it the next time.
Lesson 2, Corollary 1: Successful people are always on the look out for new experiences that they can later build on.
Lesson 2, Corollary 2: If you see an opportunity, take it. But that doesn't mean betting the ranch.

Later Trades,

MT

Tuesday, August 29, 2006

Quote of the Week - I Love Ruby!

"It is not the responsibility of the language to force good looking code, but the language should make good looking code possible." -- Yukihiro Matsumoto
I just discovered the power of Ruby!!!

More later,

MT

Tuesday, August 22, 2006

Quote of the Week - Programming

"And don't write longer, more obtuse code because you think it's faster. Remember, hardware gets faster. MUCH faster, every year. But code has to be maintained by programmers, and there's a shortage of good programmers out there. So, if I write a program that's incredibly maintainable and extensible and it's a bit too slow, next year I'm going have a huge hit on my hands. And the year after that, and the year after that.

If you write code with more code that's fast now, you're going to have a hit on your hands. And next year, you're going to have a giant mess to maintain, and it's going to slow you down adding features and fixing bugs, and someone's going to come along and eat your lunch." -- Wil Shipley

Great quote!  Read more on this topic here.

MT

Development 0.1

"Be careful about using the following code -- I've only proven that it works, I haven't tested it." -- Donald Knuth
I have finally started my dynamic allocation of equity project.  This is something I've stewed about for several weeks...okay...maybe months.  But, after meeting with Jon for lunch this weekend...I finally got the motivation back to begin work on the project.  Thanks Jon!

And seeing as how I hardly ever write anything of significance on this blog...I figure I'd start documenting some of the steps I'm taking to get this project on the road.

First thing was to find a better coding environment than what I was using.  I have been using the PythonWin IDE for my trials and tribulations.  I needed more oomph.  Hopped over to Vim and have hunted and pecked my way around a bit.  No flow joe yet.

Before moving on...does anybody know of a windows or even linux distro of the EVE$EDITOR?  Somebody?  Anybody?  Hello?

Just a week ago, I found out about the new Pydev extension to Eclipse.  Pretty nice.  It's still not perfect...but much closer to what I'm looking for.  So, now that I've found an IDE that allows me to play in the sandbox a bit...on to the database choice.

I downloaded pytables due to their "designed to efficiently and easily cope with extremely large amounts of data" claim to fame.  And then did nothing with it.  It's not the relational type of storage I'm used to...so maybe that's why.  Thought maybe a viewer would help, so downloaded the vitables viewer.  It was nice...but still did nothing with it.

Okay, maybe I'm making this too hard.  One of the python programmers I know mentioned Sqlite.  Downloaded it.  Found the python extension for it here.  Explored documentation for working with it here and here.  Now, I'm getting somewhere.  Wrote a few python modules to test create, insert, drop, and fetch.  Here they are:

Create Table in Python/Sqlite:
******Begin of Code***********************
from pysqlite2 import dbapi2 as sqlite

conn = sqlite.connect("TaylorTree")
cursor = conn.cursor()

SQL = """
    create table MarketDaily
    (
      Symbol    text,
      Bar       SQL_DATE,
      Open      float,
      High      float,
      Low       float,
      Close     float,
      Volume    float,
      AdjClose  float,
      primary key (Symbol, Bar)
    );
      """
cursor.execute(SQL)
******End of Code***********************

Insert into Table:
******Begin of Code***********************
from pysqlite2 import dbapi2 as sqlite

conn = sqlite.connect("TaylorTree")
cursor = conn.cursor()

SQL = """
    insert into MarketDaily
    (Symbol, Bar, Open, High, Low, Close, Volume, AdjClose)
    values
    (
        "YHOO",
        20060801,
        20.00,
        25.00,
        19.00,
        22.00,
        50000,
        22.00
    );
      """
cursor.execute(SQL)

conn.commit()
******End of Code***********************

Fetch from Table:
******Begin of Code***********************
from pysqlite2 import dbapi2 as sqlite

conn = sqlite.connect("TaylorTree")
cursor = conn.cursor()

SQL = "select * from MarketDaily"
cursor.execute(SQL)
# Retrieve all rows as a sequence and print that sequence:
print cursor.fetchall()

cursor.close()
******End of Code***********************

Drop Table:
******Begin of Code***********************
from pysqlite2 import dbapi2 as sqlite

conn = sqlite.connect("TaylorTree")
cursor = conn.cursor()

SQL = "drop table MarketDaily"

cursor.execute(SQL)
******End of Code***********************

Not too bad.  Not too hard.  But, then I figured I'd make a module that would handle all this stuff for me.  Some hard work began...all because I had no idea how to use symbolics in Python/SQL.  Finally discovered the needle in a haystack...'%s'.  Aha!

******Begin of Code***********************
from pysqlite2 import dbapi2 as sqlite
conn = sqlite.connect("TaylorTree")
cursor = conn.cursor()

def UpdatePrice(sym, b, o, h, l, c, v, ac):
    SQL = """
          insert into MarketDaily
          (Symbol, Bar, Open, High, Low, Close, Volume, AdjClose)
          values
          (
              '%s',
              %s,
              %s,
              %s,
              %s,
              %s,
              %s,
              %s
          );
          """ % (sym, b, o, h, l, c, v, ac)
    cursor.execute(SQL)
    conn.commit()
******End of Code***********************
After spending a lot of time getting all that going...I then turn back to pytables.  Maybe I need to dig deeper there.  Found some very good documentation here.  But, I'm still sitting here...nothing.  Hey, someone give me some motivation on working with this bad boy!  Anybody have any experience to share in regard to pytables?  If so, bring it on!  I need some mojo!

And that's where I am now.  Oh...and of course, will begin working on spinning through TC2005's databank and load historics into Sqlite.  How do I do that?  That involves working with COM objects and Python makes it very easy for you.  In fact...I'm amazed at how complicated it is to call a COM object from Microsoft's own languages like C#.  In python...all you have to do in order to get to the TC2005 COM object is...
******Begin of Code********
import win32com.client
w=win32com.client.Dispatch("TC2000Dev.cTC2005")
******End of Code**********
2 lines.  Now, I'm sure there is a much easier way to call a COM Object in C# that what I was trying to do.  If anyone out there knows how...please leave a comment.  I'm really interested to see how many lines it takes to connect.

One last thing...if C# is your thing...check out Microsoft's free version of Visual Studio, C#, and even SQL Server via the Express Editions.  C# not your cup of tea?  There is Visual Basic, Visual C++, and even Visual J++.

And that's it from here...where I'm hoping to catch up on some much needed sleep.

Later Trades,

MT

Sunday, August 13, 2006

Quote and Thread of the Week

"One of the best attributes I know a trader to have is humility. The best traders I know admit to knowing very little about what the market will do or don't pretend to have any kind of secret method or style or edge that others don't have. They just go in to work everyday like a brick layer. Their goal is to lay bricks. One at a time. And hopefully at the end of their life they have built a solid foundation. That's all a trader can hope for." -- Maverick74
Found the great quote above perusing EliteTrader this weekend.  The thread is titled, Writing Options for a Living, read here.  You'll have to be patient because a lot of time is spent with posts from people still believing in the Easter Bunny.  But, there are a few gems to be found...especially from Maverick74, riskarb, and a few others.

Later Trades,

MT

Monday, August 07, 2006

Quote of the Week


" Becoming wealthy is like playing Monopoly.. the person who can accumulate the most assets wins the game."
-- Noel Whittaker

MT

Sunday, July 30, 2006

Thread of the Week - Birth of a Turtle


Came across a great thread this weekend regarding Curtis Faith and his Turtle background.  Read here.  I especially enjoyed the story of his initial programming experience converting trading systems.  What a great first job.  And of course, always hungry for insights and traits into what makes a successful trader.  Here's Mr. Faith's take:

The ones who were successful had more emotional control. The ones who weren't successful were either too intellectually insecure and unable to commit to a strategy, too greedy, too emotionally invested in their financial success, too affected by the large swings in equity, or too averse to the risks required to trade well (probably due to a lack of confidence in themselves). One of the things that distinguished the good Turtles from the ones that were completely unsuccessful is their personalities. The traders with a more intellectual and systematic approach to life were much more successful than the emotional traders who really wanted to make a lot of money.
And finally, one of the most important insights Curtis makes:

...all successful people owe their success to the help of others. They therefore have an obligation and usually a desire to pass on the craft, to teach and help others.
I am thankful that such a thing is true.  I owe many thanks to the people that have helped my programming and trading experience grow in the right direction.  In a sense, we are all like those baby turtles Mr. Dennis refers to.  Just trying to make it out to sea and swim with the big dogs.  And avoid the many perils from beach to sea.

Later Trades,

MT

Saturday, July 29, 2006

Quote of the Week


"There is no doubt in my mind that systems and styles which offer a rougher ride will hold up more over the long run because not as many traders and certainly almost no institutional money wants the ride.




You will make more money if you can take the pain. Unfortunately, you will make little or none if you think you can but it ends up that you can't."
- Curtis Faith -



MT

Monday, July 24, 2006

Interview of Programming Greats!

A really cool interview of several of the great programmers of our time: Linus Torvalds, Guido Van Rossum, James Gosling, etc. Read here.

They answer questions in regard to what they feel is the next big thing, what new technology they feel is worth learning, what makes programmers productive, etc. Really great interview. Check it out.

MT

Saturday, July 22, 2006

Thread of the Week

A really great thread over at the Trading Blox forum.  Read here.

Best part was the comments by Curtis Faith in regard to "the characteristics of markets over time."  Curtis broke the markets into three classes:
1)  Fundamental Driven Markets - cleanest trends and easiest to trade;

2)  Speculator Driven Markets - perception driven and harder to trade;

3)  Aggregated Derivative Markets - averaging out effect dilutes momentum.

Plus, I always enjoy it when Curtis shares his Turtles experience.  His coffee story reminds me of a few trades from my Melba Toast story

Also, pay attention to Barli's mention of optimization and the effect lack of cash has on your results.  This is a very hard lesson to learn.  Most backtesting platforms will drop trades due to lack of cash.  Thus, you only see a sample size of the actual results.  There are a few solutions to this problem...but that's for another time.

Later Trades,

MT

Monday, July 17, 2006

Quote of the Week

"Every now and then go away, even briefly, have a little relaxation, for when you come back to your work your judgement will be surer; since to remain constantly at work will cause you to lose power."  --  Leonardo da Vinci
Well, I had a little break.  And during that break I moved my family to Missouri!  Yes, we are now in Missouri.  Things are going good.  Still have so much unpacking to do.  But, was able to mow the yard (grass is different here than Texas) and find my grilling supplies for a good steak dinner with a corona or two.

The break did me good.  No computer, time spent with the family, and change.  Plenty of change.  Change does the mind good.  Breaks you out of your comfort zone.  And that's a good thing...even though it doesn't always feel like it when undergoing the change.  Here's more on breaking out of your comfort zone from Dr. Brett.

And that's the update for yours truly.  Oh, and I start my new job this week.  Very excited.

Have a great week!

MT

Wednesday, July 05, 2006

Quote of the Week

"If you've been pounding nails with your forehead for years, it may feel strange the first time somebody hands you a hammer. But that doesn't mean that you should strap the hammer to a headband just to give your skull that old familiar jolt." -- Wayne Throop
This quote rings so true.  :)

Happy 4th everybody!

MT