Site Meter The Lawyer Trader: day trading
Showing posts with label day trading. Show all posts
Showing posts with label day trading. Show all posts

Sunday, March 18, 2018

Equity Day Trading List for Monday March 19th

ZSAN Zosano Pharma Corporation Healthcare Biotechnology USA 36.97M 17.44 12.52% 4,156,755
RIOT Riot Blockchain, Inc. Healthcare Biotechnology USA 82.90M 8.29 10.39% 1,201,716
OSTK Overstock.com, Inc. Services Catalog & Mail Order Houses USA 1.18B 45.7 -5.19% 7,597,563
BITA Bitauto Holdings Limited Technology Internet Information Providers China 1.68B 24.47 -11.21% 4,357,359
NETE Net Element, Inc. Technology Internet Software & Services USA 32.76M 9.58 6.21% 1,005,132
KTOS Kratos Defense & Security Solutions, Inc. Services Security & Protection Services USA 963.73M 9.28 -11.20% 12,972,464
ECYT Endocyte, Inc. Healthcare Biotechnology USA 638.26M 9.83 -4.93% 3,218,064
IOVA Iovance Biotherapeutics, Inc. Healthcare Biotechnology USA 1.37B 16.85 4.01% 2,605,054
KODK Eastman Kodak Company Consumer Goods Electronic Equipment USA 240.69M 5.6 13.13% 3,468,778
EEP Enbridge Energy Partners, L.P. Basic Materials Oil & Gas Pipelines USA 4.02B 9.99 -7.76% 10,470,381
PTI Proteostasis Therapeutics, Inc. Technology Application Software India 211.41M 7.29 2.97% 4,292,340
ADVM Adverum Biotechnologies, Inc. Healthcare Biotechnology USA 382.97M 7.2 -5.26% 1,314,989

Above is the list copied from my spreadsheet.  These are the stocks that I'll be trading tomorrow.  I recently started testing some day trading systems on baskets of stocks and now I'm in the testing with real money phase.  I will not be trading ZSAN or NETE..those are very small cap stocks and the intra day spreads have been too high to trade.  

Note that most of these stocks are what I'd consider turds that have run up or started falling after a run up..generally penny stocks that have traded their way up above $5 or $10..with the exception of overstock (ostk)..that one's just a turd..lol.  

If I keep up the day trading equities, which I'm pretty sure I will, I'll start posting more on it.  Basically, I trade around 10 stocks with 2 automated systems..nothing super fancy.  Then the real work is working on the scans the night before or the morning of.  I scan for volatility and volume with Finviz and build a list.  Actually, I build several lists and keep track of the trading performance on all of the lists and then narrow down the list for the actual trading.  The key is to save the daily screens to build data and then I can go back and test ideas.

Hope everyone had a great weekend.

George 
(TLT)

Sunday, December 7, 2014

ThinkScript Indicator: CalmvVolatile

This is a pretty basic stud that compares the current Average True Range (ATR) with a long term average of the ATR.  The default periods are 14 period for the ATR and 500 period for the average.


This indicator can be helpful as a quick reference when taking short term trades.  If the instrument is volatile, you know that there's a better possibility of a quicker and farther move than if it's calm.  Enjoy.  The code is below.


#######Delete this line in TOS#############

input atrlength = 14;

input avglength = 500;

input plotlower = {default "yes", "no"};

def vol = AverageTrueRange(atrlength);

def avgvol = Average(vol, avglength);

def calm = vol < avgvol - (avgvol * .1);

def neutral = avgvol + (avgvol * .1) > vol > avgvol - (avgvol * .1);

def Volatile = vol > avgvol + (avgvol * .1);

AddLabel(yes, Concat("Market is Currently ", (if calm then "Calm" else if neutral then "Neutral" else if Volatile then "Volatile" else "Neutral")),  if calm then Color.GREEN else if neutral then Color.BLUE else if Volatile then Color.RED  else Color.GRAY);

declare lower;

plot window =  vol - avgvol;

window.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

window.AssignValueColor(if Volatile then Color.RED else if calm then Color.GREEN else if neutral then Color.BLUE else Color.GRAY);

plot zeroline = 0;

######delete this line in TOS##############

Monday, June 3, 2013

Equity Curve Analysis: Can Prediction Beef Up an Edge?

I've been doing lots of research lately on trading systems and analysis of trading system results.  Equity curve analysis is not necessarily a new idea, however, it is something that I've not spent much time on until now.  So how does it work and what can it tell you?  Well, I'll share what I've done.  Surely there are some great methods that have been discovered and refined by others, however, I just started from scratch and started tinkering with some math that made sense to me.  Sometimes you can get some good results with doing that..other times you spin your wheels but you generally end up learning something.  The following breakdown is my version of equity curve analysis and I share this not to necessarily say it works and that you should copy it, but to possibly share some ideas that others can build on.

First, I started off with a mechanical day trading system that I created.  The system itself doesn't really matter, I'll just say that it's a fairly decent performing momentum strategy that makes about one trade a day on average.  I took a few years worth of daily returns and plugged them into a spread sheet.  This creates a time series out of the daily returns and the great thing about having this is that you can line it up in a column next to other pieces of data or indicators and look for patterns in what is useful.

Second, I took several other pieces of data like:  1, 3, and 5 period daily ATR (average true range) readings, volume, prior day return, 2 Period RSI and a few other pieces of data, and I lined up the indicator data with the returns.  Then I shifted the return row (moved it down/forward one day) so that the end of day data that I had could be used to try to predict the return of the system for the next day.  This exercise alone was very interesting.  To determine what factors (indicators/data) were useful, I ran regression analysis on the various factors and looked for significant R Squared and P-Value readings to tell me what factors were actually predictive and what factors/indicators were more random and not useful.

Third, after determining a handful of factors that regression analysis said was useful, I normalized the data by taking all of the factors and then divided them by that day's close.  This way, an ATR would be useful whether the instrument being traded was currently traded at $10 a share or $100 a share.  I also took a five period moving average of the data and then divided each factor's data point by it's trailing 5 day average.  This is particularly useful for volume because an instrument might trade an average of 50k shares a day for a while and then bump up to 300K shares a year later.  I wanted to isolate above average and below average conditions relative to the instrument's recent trading history and then compare those reading to values from several years before.

Fourth, I took a neural net program and several years worth of data and trained the neural net with the data..this is straight data mining at this point.  The most important part of it was knowing that I'd likely used relevant factors (b/c of the regression analysis) and I'd used normalized data so the neural net would learn on apples-apples data.  After I had a fairly decent neural net that was trained with a significant amount of good data..it was time to start predicting.

Fifth, I had the neural net predict the system's returns for a couple of years of out of sample data.  One problem with neural net predictions, at least the one that I've been using, is that it's often decent at catching turning points but it's not great at predicting magnitude i.e. how large the move is.  So I took the daily change of the neural net prediction (for example if yesterday's prediction was +1% and today's is +.5%, the reading would actually be a -.5%) and this helps actually gauge whether the system will likely make more or less money tomorrow.  

Sixth, I made the output binary and had the data transformed into 0s and 1s.  A zero merely meant the system would likely lose money and a 1 merely means it will likely make money for the day.  Now it's time to throw in some money management or position size rules based on whether the prediction for the system would likely make money or lose money.  The initial results for the plus day/minus day readings are about 60%..meaning that sixty percent of the time the prediction was correct.  This is not a huge edge but it seems to be a little better than random.

Seventh, I tested a basic money management rule based on the predicted profitability of the following trading day.  If the prediction said that the system would make money the following day, a double sized position was taken on the trades for that day.  And if the prediction was that the system would lose money, a half position was taken for the trades of that day.

And the results please...

It appears that there's some merit to this.  Below is a chart of the returns of the predicted money management system along side the normal system without the money management rules.  Also, there is a line of random money management rules too just to see what a random result would look like.  The random line was developed by having a random 0 or 1 drawn from a random number generator and then applying the money management rule based on the random drawing..kind of a control group.  The fourth line of the graph is the difference between the prediction money management system and the straight returns of the system.  Here's the chart:


As you can see, the prediction money management system outperformed the non money management system by about 80% (the horizontal axis is the cumulative returns, just in a non percentage format..so 1.0 is 100% and 2.6 is actually 260% etc.) over 489 trading days.  Furthermore, the random money management system was actually in the middle of the predicted and straight returns.  Another interesting aspect is that the difference from the predicted money management and the regular returns levels off and stays flat..this could be indicative that the further the neural net gets from the training data, the less accurate it's predictions become.

The results indicate that the predictions on the profitable trading days tend to maximize gains and minimize losses over time.  It's obviously not perfect, but what is in finance and trading.  The prediction seems to add to the edge that this system has and it helps provide a fairly linear equity curve.  The analogy that I've used to explain this concept is that it's like counting cards in black jack.  Keeping up the count doesn't give you a huge edge, but it gives you enough of an edge to tell you when to bet more or less which allows a good black jack player to slowly grind out a profit.  Also, the count doesn't necessarily tell you to play the cards different from basic strategy (ok, it does some but for examples sake we can say it doesn't).  The predicted money management rules tell me nothing about the buy and sell signals from the system, it just says to dial up or dial down the position size..much like the count in black jack.

So where to go from here?  A little more testing wouldn't hurt.  Also, there's some work that can be done with the actual money management rules as well..i.e. something a little more complex than bet half or double for any given day.  I could easily run a solver program to optimize the position strategy, but that type of curve fitting is getting a little ahead of yourself if you're just testing to see if there is an edge to begin with.  Also, I could test the actual buying a selling rules based on the predictions..such as, let trades run longer on profitable days and cut losses quicker on predicted negative days.  I might dabble with some of these extensions, however, the more rules you add to it, the more curve fitting and the less robust the actual system will be.

For now, I have a fairly decent result showing me there's an edge with running and applying this type of analysis.  Hopefully this all made sense and maybe it will spark some ideas for some that are out there testing the same types of concepts.

One last thing to note..the use of a neural net was not particularly important with the example.  For those unfamiliar with them, they are really just another type of forecasting tool.  One could easily come up with something similar using linear regression, polynomial regression, arima, garch..etc.  Any type of forecasting can be used and combinations of these different methods can be used as well.  Just didn't want anyone to think that if you're not knowledgeable about A.I. and neural nets that it's not worth bothering...that is not the case at all.

Take care and good luck with your trading endeavors.

TLT

Friday, September 7, 2012

Do More of What Works...

I've been reading Jack Schwager's Hedge Fund Market Wizards, which is a phenomenal book and is just as good as his first two and I highly recommend it to anyone who trades or is interested in trading.  One of the hedge fund managers in the book gives the advice of "find out what works and do more of that" or something to that effect.  Although simplistic, there is a lot to this.  One thing that I've been doing more of lately is active currency trading.  Why?  Simply because my account records show that it works for me.

That is why I want to talk about how smooth the currency market and in particular the Eur/Usd currency pair has been lately for short-term trend and swing trading.  When trading currencies, you must have a routine and specific set ups that you look for and then trade them.  And when those set ups are working well you have to trade them more.  Right now, the opening range breakout trade has been excellent.  The past two days have provided great opportunities to make significant returns with only trading this set up.

I have addressed the opening range break out trade in several posts, but I'll quickly explain what it is for those that are unfamiliar with it.  Basically, you take the first 15 minutes of trading (or it can be 5 minutes or 30..different people use different times) and you note the high and low of the period.  That creates the range. Then you patiently wait for the price action to trade out of the range and trade in that direction.  Generally, I'll day trade with the 5 minute and 1 minute charts.  I'll first look to the hourly and daily charts to determine the bias or the primary trend and then look to for break outs in that direction to trade.  So for the past few days, the bias has been to the higher side...that tells me the path of least resistance is higher and I should look for long trades.

Then I wait for the break out and put the trade on immediately after a 5 minute bar closes outside of the range.  After that I trail a stop with the 1 minute chart and look to book partial profits into momentum and use the trailing stop on the remainder of the position.  If the currency trades back into the range or to the bottom of the range you get out..or have a stop sitting there.  With currencies, it is a little difficult to determine the open.  I will generally trade the 8:30 stock market open with the Eur/Usd since it is pretty correlated with the US stock market.  After I've exited a profitable trade, I look for pullbacks and the support to initiate a follow up trade back to the highs.  After this, I'll look for the highs to be taken out and then trade that break out.  Then I'll look for another pullback from the new high and once it finds support I'll put on another trade.  That's it..plain and simple.  If I'm seeing follow through and the trade is working, I'll keep doing it over and over and over.

Here's a 5 minute chart with today's Eur/Usd with an opening range plot on the chart and some of the trades that I made today.
The opening range is the yellow shaded region.  The bars are all green on this chart because my trendfuzz indicator was in Strong Up Trend mode all day long...not a common event.  Notice that I did not take the OR break below the opening range, as this was a low probability trade given that the trendfuzz was green and the overall bias was up...that's not to say that it always turns out this way, just that today was a perfect day not to take the short trade.  Other days I might take the short trade even with a prevailing bias to the upside, I would just trade a smaller position and book profits very quickly.  Today was a little different because yesterday was incredibly strong and my personal sentiment is very bullish.

This type of trading can be very profitable and very rewarding, you just have to maintain discipline to wait for the proper entries and cut losses quickly.  It is by no means easy and often is very frustrating which is why some people are not suited for day trading.  Over the years, I've gone through periods where I thought I was good at it and was very suited for it and other times where I questioned whether it was for me.  The thing that I've noticed is that day trading equities is a little more hit or miss with me but currencies have been profitable for several years..I just have to stick with it and trade through those incredibly difficult draw downs that have a tendency to leave traders gun shy right at the moment that the next winning trade needs to be put on.  Ok, that's enough rambling for one day.  Hope everyone had a great week and has a great weekend.

TLT