Sunday, February 26, 2017

Weekend Review 02/26/2017

One of my personal objectives this year is keeping money.  This seems like a patently obvious notion --and it is-- yet this has been a notable blind spot in my track record which I'm looking to rectify.  In practice this means being more disciplined and selective of the periods I will trade and how heavily I will expose capital.  In order to better quantify these periods I've begun to increase emphasis upon my % Win/Loss and Avg. Winner v. Avg. Loser to determine when my risk of ruin is drifting upwards as well as a risk/reward quadrant that aligns my trading philosophy more closely with my trading objectives.

One thing I've noted as the month of February comes to a close is that my Avg. Winner/Avg. Loser ratio has begun to decrease.  This is coinciding with the overall market reaching a zone that I consider to be extended.  A metric I pay close attention to is the percentage of stocks greater than 70 over multiple time frames, the 20, 40, and 200 day period.  As the number on all three time periods has clipped 70 over the past month of trading my near term expectation is an upcoming pullback across the shorter period with the possibility of carrying over into the higher time periods.  There is already evidence of this occurring over the 40 day period.

% Stocks > 20 Period Moving Average

% Stocks > 40 Period Moving Average
% Stocks > 200 Period Moving Average


Additionally the breadth trends I follow have been waning for some weeks now so the overall market is entering a phase that I consider to be higher risk with lower reward on my time horizon.  At these levels I'm becoming increasingly skeptical and focusing more on capital retention then appreciation.  I'll lean more towards reducing position size and expectation along with avoiding margin.   Continued erosion of these numbers would result in a breadth flip that would increase my cautiousness and begin to look at exposing capital on the short side.

Ratio of Stocks > 25%+ in a Quarter

Stocks > 13% over 6 Weeks

Thursday, February 2, 2017

Test Driven Trading

In software development there is a technique called Test Driven Development which is a process of taking requirements of a project and breaking these requirements down into cases which will be accepted if proven.  These test are often derived from user stories and are typically broken down into unit test which test expectation of a function or method, as well as integration test which test a feature from end to end.

There are two common ways of testing.  One is to write the test the code is expected to pass first, and the other is to write the code then test against it.  What I'm interested in exploring from these concepts is how traders can incorporate this thinking to test their plan, debug inefficiencies, as well as introduce new concepts without breaking the current flow of execution.  How can traders approach their trading from the perspective of a software developer?

The process of an integration test can be used to develop a process from how to approach studying to setting alerts, entry, stop placement, and exit.  Once we have applied the theory of integration test we can apply the concepts of unit test for handling the minutia of a trading plan whether it be entry, placing a stop, or exiting a position.  For this I'm going to look at one specific syntactic approach: Given, When, Then.

Given, When, Then is a syntax that when coupled with Feature and Scenario complete an approach called Behavior Driven Development.  In this approach a small chunk of the trading plan such as an exit can be broken down such as:

Feature: I have an open position
Scenario: Exiting the position
Given: A trade hits my target
When: I take half off
Then: I will move my stop to break even on remainder.

Feature: Half Sized Open Position
Scenario: Exiting the position
Given: A trade hit my target and I moved my stop to break even
When: Price hits 20% from entry
Then: I will exit the remainder position

Now, when reviewing previous trades or searching through previous winners we have a focused set of criteria to pay attention to.  We can better understand how our previous trades would have worked under these guidelines.  Additionally since these test are being applied to the minimal amount of execution on our part, complexity setting in can be more easily identified by noticing when the test are getting too verbose and have too many steps or moving parts.  And, while these test may pass on past data, a complete integration test of this on one's actual trading plan may not work out as expected.

Simply because something worked in hindsight doesn't mean I will be able to execute.  As such, whenever I make a modification to a critical part of my trading plan such as an exit, I drop down in size and take twenty trades.  I don't assume I am going to act in accordance and can not presume potential frustration should this new exit technique not work under current market conditions or be psychologically comfortable to me.  By dropping down in size I reduce the risk to capital and some of the stressors associated with a position size I may not be comfortable.  Being undersized when using these parameters increases my chance of success in abiding by the rules and achieving a large enough sample size to be meaningfully analyzed.

Additionally, thinking in terms of test prevents straying from one's trading plan when making adjustments.  Often when something isn't working traders will jump ship and adopt a different trading style instead of maintaining a consistent philosophy and making necessary adjustments. Through testing each function of the trading plan it become easier to isolate and identify where potential problems are creeping in and handle them accordingly.


Friday, January 20, 2017

Debug Your Charts

Lately I've returned to coding and web development.  One of the things I started to dwell upon is how debugging a program relates to trading.

Bug Free

The above image is a Ruby file.  It runs and is bug free.   In order to get this to perform an actual task the trade offs begin as each character added increases the functionality but also the possibility of introducing a bug.

Perfect Chart
The above image is a stock chart.  It runs and is bug free.  In order to get this to give us actual information the trade offs begin as each added data point and indicator increases the functionality but also the possibility of introducing a bug.

This chart is actually...

Chart of AAPL

How does our perception of this chart change by introducing just one piece of information, the name of the company?  Is the chart suddenly more bullish?  Do you think of the laptop you might be viewing this on or the phone ringing in your pocket?  A simple name on a chart can result in attachment, belief, or bias.  In other words a potential bug.


Organized Trader- Using Google Spreadsheets and Gmail

Over the past year I've taken some time away from the markets to place more energy and focus on other goals and passions.  As I entertained these endeavors I mostly ignored the market.  When I did take a glance I started to make analogies.  I continually asked if there was a trading lesson to be learned or if what I was studying could relate or enlighten me in some way about trading and how I traded.

When I returned to my market studies the most important things I realized was that I am much better off ignoring the market as much as possible.   I didn't want to obsess over finding trading candidates on a daily basis.  I didn't want to log into my platform every half hour to an hour to see what may have triggered or how much a trade moved in my favor or against.  Another important realization was that my holding period was too short.  I was never really giving my trades enough time to work out and choked off positions much too early.  When I resumed actual trading I made a 20 trade commitment to a plan that addressed both of these realizations.

One of the first things I did was look at this as a problem solving exercise.   I started to think about what tools I could use to achieve my objectives and then a process loop on implementation.  The first thing I settled upon was avoiding daily chart analysis in preference of weekend analysis.  I would run my scans searching for candidates and then whittle this down further to a hand full of higher conviction anticipation trades along with a secondary list of setups for break outs.  Once I have these candidates I map out their entry/stop/size/targets using Google Spreadsheets.

Google Trade Sheet
Once I have my candidates I then set alerts on my platform to be emailed .   I have a Gmail account set up specifically for trade alerts that I have synced to my phone.  These emails set out the parameters of the trade so I can either fire off one from my phone if I'm mobile or log into my platform.

Email Alerts

Having done this for the past few months I've gleamed some insight, truth, and wisdom, along with a dose of reality and humbleness.

The most important awareness this process cemented with me is trading isn't Pokemon and I'm not going to catch them all.  This may well seem obvious but looks can be deceiving.  What I now had in front of me is concrete evidence in real time of triggered trades.  With this data I could now ask myself questions at the end of the week.  Was I in a trade from my overall watch list that performed the best?  If not then why?  Did I take all of the anticipation trades that triggered?  Again, if not then why?  The biggest benefit of this was demystifying the left of the chart.

Past studies of stocks can give the belief that they are catchable and that we as traders could have made the best of them and now will do so moving forward.  While it's eye catching to see stocks move up 100% or more over a short period of time it's important to take caution of all that glitters.  While these are absolutely worth investigating and filtering through one's methodology, they can also leave a false impression.  By having time stamped data I now know which one's I entered and can know in real time if I missed a big mover because my capital was already tied up, or if I may not have been trading that week, or price may have run too fast too soon by the time I could hit send.

Come the end of the week I will walk through my overall watch list and take note of what stocks moved the most and what refinements I can make with this knowledge.  I also go through those that triggered but failed and those that failed completely to maintain a balanced perspective as well as pertinent information about the overall health of the market.

Another awareness I came to was expectation.  Two key pieces of information I keep track of are the number of stocks that hit 2-1 or 20% over my holding time frame.  This assist me in managing my exit plan.  This could be the difference between taking off my full position at 2-1, taking off half and riding the rest over my time stop or 20%, or gunning for a full 20%.

Are my stocks triggering?  Monday morning 6:35 PST with four alerts pinging tells me a completely different story then Wednesday afternoon an hour before market close with one finally triggering.  I may consider that worthy of a pass.  It also informs me whether I might be willing to go full margin by the end of the day or take some break outs before the close.

This year my commitment to trading will be putting in the leg work on the weekends, ignoring news and noise, refining and filtering the process, and removing myself from the market as much as possible during the week.




Sunday, January 31, 2016

Weekend Review January 29th, 2016

10 Day Buying-Selling

During correcting markets it is not uncommon to see multiple days with intraday swings in excess of 2% on the indexes.  While it was positive to see multiple indexes close near their highs with 2-3% moves at the end of Friday's session, it was more promising due to broader based buying.  One means in which I keep track of that is the differential between buying and selling of stocks over a 10 day window.  What has occurred over the past two weeks is one of the lowest readings since I've been tracking this swiftly become positive.

This positive can also be seen in the new leadership scans run which were showing 99 stocks at the end of last weeks session plump up to 368 this week.

New Leaders 338

While some of my shorter term scans are perking up and my belief is that in the least a tradeable bottom is now in place, the next step is waiting for my momentum scans on my time frame to plump up along with stocks setting up favorably to increase.

Saturday, January 23, 2016

Weekend Review 01/22/2016

While I view the market as binary, I choose not to do so through the prism of bull or bear market, but whether or not a market is conducive to my style over my time frame.  One of the reasons I take this view is that it is on my terms and not contingent upon someone else's perspective, belief, or just plain bloviating.  Recently I've seen a number of views as to whether the market is currently in a bear phase or not.  I've seen: We're in a bear market because the Russell is down over 20%.  We're not in a bear market because the SP is only down 10%.  We're in a bear market because the number of NASDAQ stocks above their 50 period average is below 10%.  We're only in a correction.  We're about to top after a 7 year bull run.  We're not in a 7 year bull run because the Russell dipped 20% in 2011.  Confused yet?

This weekend I'm not looking at breadth metrics in particular.  Weakness beget more weakness the past couple of weeks and expectation of a reflexive rally failed to produce.  So now my expectation of a strong bounce has only increased and I continue to view this as a high probability event.  Whether it is conducive to trading on my time frame or not is a different issue to assess.  What I am looking at this weekend is my scans to see if there are potential candidates.  The reality of the situation is that there really aren't many to look at since my scans are barren to begin with.

One scan that I run it to look at stocks that have made a $15 move over a month period.  There are only three that met the scan conditions.

$15

Another I run is is stocks that have shown consistently steady momentum readings.  There are 9.

Slow and Steady

A scan to check for stocks that move my expected return over time frame shows 99.  If I limit this by the stocks that meet my momentum requirements there are 17.

Return over TIme Frame

As I'm primarily a long oriented swing trader the scans I run daily tell me everything I need to know about my market.  The number of stocks hitting new lows vs. new highs over different time frames tells me what I need to know about the general health of the market.  What anyone else says shouldn't be informing me.

This is often easier said then done.  As a market participant I believe that most of us have the best intentions but fall into the same pits.  Most of us at one point int time have said we would stop doing something or listening to somebody, yet not follow through.  Most of us have said at some point we would improve one thing about our trading, yet not start.  As some point we've likely said we'd simplify our charts only to add one more indicator after rebuilding them from scratch.  There's a good change we've said we'd simplify our watch list and vehicle selection only to open up the restrictions when there weren't enough candidates.

We're currently in a chippy market when everybody has something to say and expect others to appreciate their 2 cents like it's a nickel.  There will be calls of a crash.  There will be post of people claiming to nail the bottom to the penny.  If ever there are times to focus on controlling what can be controlled and hermetically sealing oneself in a vacuum it is now.  If there is a time to listen to the market alone it is today, with the market closed. Put on a headset and listen to some tunes, the only respectable noise to be letting in right now while doing your own analysis.


Sunday, January 10, 2016

Weekend Review 01/08/2016

After nearly a year long hiatus which I may talk about another time, I enter 2016 much like I did 2015.  I'll consider this a tune-up post to get my head back into the game.

It doesn't take more than a quick glance of nearly any index chart to see that the market has been less than conducive to trade on my time frame, and I suspect many other's time frame as well.  This week I decided to take some notes and observations on higher time frames than my usual to get a slightly bigger picture perspective before burrowing down.

I decided to look at a monthly chart of the indexes using a 6 and 24 period moving average.  The logic behind using these two averages is that I quantify my universe by 3-6 month momentum, and that momentum higher than a year tends to mean revert.  One of the things that stands out is a cross of these two averages happened rarely over the past decade and a cross to the upside signified a prolonged upturn in a market cycle while a cross to the downside signified a turbulent period.

SPY Monthly

QQQ Monthly
IWM Monthly

If past occurrences of this are a road map to guide us down the path ahead, treading lightly and being nimble until more concrete positives pave the way might be worth keeping in mind over the next 2-3 months.

On a weekly time frame using GMMA, infrequent occurrences are also forming as multiple moving averages continue to roll over on a higher time frame with the IWM taking the brunt of it for the longest.

SPY GMMA Weekly
QQQ GMMA Weekly
IWM GMMA Weekly

While I think on a higher time frame there are going to be some challenges ahead as the market shakes off whatever it is currently worked up about, there are some positives to be mindful of in the near term.  First, the percentage of stocks below their 40 and 200 period moving averages are in the zone where bounces tend to happen and bottoms get formed.  This suggest that there is a high probability of a snap back rally which can be taken advantage of through the indexes more easily than stocks.  It's simpler to find a vehicle selection from index ETFs then anticipating which type of stocks might see the benefit of a bounce: value, growth, momentum, most oversold, setting up best, fund favorites etc...

% of Stocks > 200 MA
% of Stocks > 40 MA

In addition one of the indicators I follow is in a zone where over the past couple of years there has been a significant low in place on the indexes.  There are a few situations where this has undercut the 6% threshold but this would just favor a probable snap back.

% of Stocks > 25% in a Quarter

Two scenarios I envision Monday morning are a gap down flush which would offer a low risk opportunity to go long from my perspective, or a gap up which would also offer an opportunity but one I'd approach more cautiously.  Shorter term there will be some tactical opportunities and longer term I believe there will have to be some strategical adjustments to be made until the market gives greater clarity of a resumed up trend.