January 15, 2010

Trying Out Python

With the encouragement of @W0nk0, I've decided to start fooling around with the scripting language Python.  It appears to be an easy script language to learn and I hope to build various routines that will help me with my Automated Trading System.  There's also an open source ANN library for Python (and others) that I plan on fooling around with too.  That, coupled with ibPY, will let me finally build my ATS over the course of the year(s) and hook it up to Interactive Brokers.

My Morning Trading Routine – About 30 Minutes A Day

My life is extremely busy these days and I've gotten my "trading" down to about 30 minutes every morning, before the market opens. Unless I initiate a new position, my daily trading routine is as follows:

  1. Download End of Day (EOD) closing data into my trading worksheet. (5 minutes)
  2. Run my strategy through the data (my worksheet does this automatically via Excel Macros) (<1 minute)
  3. See which positions I need to move my stops up in. (<1 minute)
  4. Log into my trading account and move my stops (10 minute)
  5. Post on Twitter which symbols I'm moving my stops up on (2 minutes)
  6. Scan of all-time highs (<1 minute)
  7. Look through the charts of the new all-time highs (10 minutes)
  8. Place candidates on my stock watch list (5 minutes)

Time spent is about 30  minutes every morning.  If I initiate a new position, I'll either place a market order for the open or wait till after 10AM to make a buy and place a stop.  That adds another 5 minutes to my routine.

Have a good weekend all!

December 29, 2009

Calling ATR and A Stop Loss Macro In TraderXL Pro

 

Yeah, I still use TraderXL Pro for a bunch of my data manipulation and technical analysis stuff. I use it to download data and run macros through it, macros that I design and then use in my trading screen. After my fucked up 2009 trading year, I had to revamp my entire arsenal of macros and screens for a brighter and more profitable future, I hope.
 
Anyway, below is one of the many macros I use in TraderXL Pro for generating an automatic stop loss using and Average True Range (ATR) function. I then suck this data into my trading screen, and through the use of other magical macros. I then determine if I have to move my stop or sit on my hands.
 
Since I love you guys, here’s the macro call for the ATR function and the stop loss. First name your spreadsheet Current_Stock_Holdings.xls (you can change this later) then copy this into the AutoRun Macro box in BulksquoteXL.
 
AverageTrueRange("G1","X");Current_Stock_Holdings.xls!Module1.Stop_loss_ATR;StockChart("OHLC","J1")
 
 
I use a 20 day time period for my ATR function, as the image above shows. You’ll have substitute “X” in the callout function above for the time period you want. It can be 5, 10, 15, or 50, whatever floats your boat and your needs.
 
Once you’ve done this, then you need to copy and paste in the macro for the stop loss function below. Make sure you save it to your spreadsheet locally. As with the ATR function, you’ll have to edit the X.X that I highlight below to a multiple that you like. It can be 1.5 or 5.5 times the ATR. This will generate wider or tighter stops based on your individual preferences. The smaller the number you input, the tighter the stop you generate. Conversely the larger the number you input, the looser the stop.
 
You can use the Macro Viewer function in TraderXL to import the macro below if you don’t know how to do it manually. Copy and paste the function between the ++++++++’s into a TXT file and then import it.
 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Sub Stop_loss_ATR()
'
' Stop_loss_ATR Macro
' Macro recorded 12/15/2009 by neuralmarkettrends
'
 
'
    Range("H1").Select
    ActiveCell.FormulaR1C1 = "Stop Loss"
    Range("H21").Select
    ActiveCell.FormulaR1C1 = "=(RC[-3]-(RC[-1]*X.X))"
    Range("H21").Select
    Selection.NumberFormat = "0.0000"
    Selection.NumberFormat = "0.000"
    Selection.NumberFormat = "0.00"
    Selection.Copy
    Range("H22:H253").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
End Sub
 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
Just a side note, you might be wondering why I call the stockchart function “StockChart("OHLC","J1").” I do that so I can create a nice candlestick chart next to the downloaded data as eye candy.
 
That’s it, there you have it. Now go cause mischief!

December 28, 2009

50% Off On TraderXL Till December 31, 2009

If you're itching to buy TraderXL and have put it off, now's the time to do it.  They are offering a 50% coupon code for TraderXL and other codes for individual packages. TraderXL is the only XLS addon package that I use religiously for all my technical analysis, data manipulation, and macro writing.  Do it, its worth it!

April 16, 2009

Back To Forex!

I’m so looking forward to start trading my favorite market of all time again, FOREX!  I have my many neural net models to update for sure but this time I’m going to test out some automated systems, aka robots, as well.

I’ll probably go back to trading the London market open using a breakout strategy if its still viable.  I like that strategy alot because I’m usually asleep when the trade is entered! LOL!

January 2, 2009

New Year, New Models, New Work

Now that the new year is here and we went through the greatest meltdown since the Great Depression, what shall I do?  Well, max out my 401k for sure and update my neural net models!!!  I’ll be busy working on them but I’ll probably starting moving toward more genetic algorithmic models this year as they tend to adapt better to the shifting market place.

My market timing model seems to be holding up but I’m going to review it to make sure its still giving me the right signals.  The volatility indicator is showing a major pull back in market volatilty and if it continues to fall, I’ll say we’ve made a bottom.

On the flipside, Obama’s Infrastructure Stimulus plan seems to be going ahead as all my clients are scrambling (compressing schedules) to make the projects I’m working on meet the stimulus schedule.  That means I’ll be super busy from now till April.  If the stimulus really comes on full force, then I’ll be busy for years.

August 19, 2008

Market Timing Model Says Buy!

My market timing model issued a BUY yesterday. The 1276 level in the S&P500 seems to be a very powerful area and I’ve added to my positions at 1276 the last time a BUY signal was flashed. Only time will tell if this was a wise move.

In other news, my new genetic algorithmic component to the timing model is showing that the market will firm up the further gold falls and as long as interest rates on the 13 week T-bills stabilize around here. Another component of the model looks at international markets and things seem to be firming up there as well.

Still though, my monte carlo model shows that volatility is expected to spike in the coming weeks, just in time for September.

In other non-market related news, I spend a lot of time in Twitter these days, you can follow me there if you like.

Ok, back to work.

June 3, 2008

Help Me Build A Marketing Timing Widget!

Since the ATS project is floating around in la-la land, I want to move forward with my next project, a market timing WordPress widget. I’m looking for a PHP/WordPress widget developer that can build me this: nmt-market-timing-widget (PDF)

I’m willing to pay for it but you must sign a NDA to get the formula that drives the timing model. Email me your quote if you are interested; its not a big project and I suspect a smart developer can bang this out in a few days.

ATS Project Floating Around

I got so slammed with work lately that the ATS project hasn’t gone anywhere. Sheesh! I can only be mad at myself because the ATS psuedo code document sits on my desktop, unfinished. My development team has gotten busy themselves and I’m thinking I might just have to hire developers from India or elsewhere.

Perhaps after June is over I can work on it more diligently and get it done. In the meantime, Ugly’s ATS success is keeping my ambition burning.

May 5, 2008

The Atlas Shrugged Connection

I’m pretty ecstatic for Ugly after I read the news that he’s quitting his job to join a web startup building ATS’s. I consider Ugly the friend I never met and he’s been the inspiration for me to start my own ATS. I can’t help but think about Ugly’s post today and his discussion about “earned wealth” and the creation of value. It wasn’t until I read Atlas Shrugged, nearly 15 years ago, that I understood this important concept. I’m happy that Ugly has seen the light.

As our society becomes more socialized, with our citizens expecting the government to take care of them (i.e. healthcare), I expect more and more rogue thinkers/entrepreneurs to gravitate to Ayn Rand’s ideals and seek true capitialism. A lot of deluded people think that capitalism has failed because of the recent credit crisis and the “greed” that got us here. The real reason we are in this mess was that Greenspan sold out and catered to the Bush Administration by lowering rates to ridiculous levels just to keep dubya in office.

Now, with the Fed bailing out Bear Stearns, we set the precedent that banks can create risky loans, screw the citizen in the process, and get bailed out by TAX PAYER money when things go wrong. Once again we see a system of “privatize the profits, and socialize the losses.”

If you haven’t read Atlas Shrugged, I suggest you pick up a copy and do so. It will change your life and how you see Capitalism. It truly is the motor of the world.

April 28, 2008

Busy Being An Entrepreneur

I’ve been super busy being an Entrepreneur and I’m loving it but my blog is suffering. I guess once I’m super rich I can blog from my villa in Costa Rica but in the meantime I have to sneak away and post when I can. I started on my ATS pseudocode but its slow going as I expected. Its been difficult to write it down in a way that I think the developers would understand it and accurately code it. I’m trying my hardest to get it finished by our initial May 3rd deadline but it might not be ready. The way I figure it, you have one shot to get it right so if it takes a few more days than I’ll have to miss the deadline.

April 25, 2008

ATS Development Starts!

I had a great meeting last night with my ATS team! We’re all on board and we’re all roaring to go! The next step is for me to write down my trading strategy into something called “pseudocode.” Essentially is a simple outline of statements that the developers will use to code the ATS. This will require some thinking on my part because a lot my trading strategy is in my head and transforming those “organic thoughts” into hard code will be challenging for me.

We do have some housekeeping things to take care of like signing a Nondisclosure Agreement in case the team falls apart. Although I doubt that will happen, you still have to be business smart and protect your hard work (not just mine but the teams).

Despite that, I’m very excited that the ATS is moving into production. The team is really motivated since they have no understanding of how the markets work and they want to learn how to better make money in the markets; geed is an wonderful motivator!

Next Page »