Trading Update - 1

Is anyone reading these? They’re mostly to track my progress so I guess I don’t care too much.

I’ve stopped creating watchlists and have not made a trade since $AMD earnings a few months ago. I haven’t found watchlists to ever be helpful for some reason. I’d mark support/resistance and areas I’d like to get in at but they’d never do what I want or I wouldn’t pull the trigger. Most of the time you’re just playing the stock too late and it isn’t volatile enough the next day.

I’ve found looking at the top gainers / losers in premarket with a fresh catalyst is much easier. Identifying the premarket trends with daily support/resistance levels then trading based off the trend changes makes it easier, too. It’s still really difficult because sometimes the stock just doesn’t do what you think it would, or you don’t pull the trigger and it does exactly what you want.


Anyway. The last few months I’ve still been working on trading algorithms for stocks. It’s taking forever to get each algorithm perfected because you can’t just backtest one stock going back 100+ days to make sure it works. Each day is different because of news and which stocks gap up/down the most. It will rarely, if ever, trade the same stock the next day. The patterns are valid but the pattern may not occur on the same stock going back X days.

The cool thing is it has made profitable trades going long and short (paper trading of course). Just yesterday it traded $SAIL on a red to green move and made a quick 50c/share. Today it took another red to green setup but it got in too late after the whole move was made. It could have been profitable but the volume came in after it already spiked (I have a relative volume check to filter out junk). So relative volume finally met the requirments after it made the move. It bought too high and got dumped on for a 25c loss.

I have to go in and optimize it to make sure it does not buy too far off from the open price. It’s a tedious process that takes forever because it might not take a trade for a whole week. I’m able to backtest using IB’s tick data on each individual trade to make sure it has proper entries and exits.

Another cool thing is one of my strategies I found because of Kunal Desai from Bulls on Wall Street (I’m not affiliated with them in any way) months ago. I was in his webinar and he was asking people to give a good example of an “opening range breakout” that occurred that day (it was technically a bull flag so I don’t know why he labeled it an ORB). Well, guess which stock my algo traded that day? $VRAY. The exact same one he said was a perfect example.

$VRAY

Example backtest:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Starting backtest on $VRAY...
Retrieving intraday candles/ticks...
Retrieving daily candles...
Backtesting 07/25/2018...
[07/25/2018 09:45:00] Entry @ $11.40, target $12.20, stop $11.12 [ Bull Flag ]
Trailing stop: 11.12, 11.42
[07/25/2018 09:50:00] Exit @ $12.22 [ $0.82 ]
P/L: $82.00
Gross P/L: $82.00 / $0.00
Commissions: $-4.00
Net P/L: $78.00
Win/Loss: 1 / 0 (100.00% / ∞)
Trades: 1 (1 long, 0 short)
Avg $ win/loss: $82.00 / $0.00
Best/Worst: $82.00 [ Bull Flag ] / $0.00 [ ]



Here’s an example of a trade it took recently on $CRTO. This is a bear flag chart pattern and it ended up working perfectly. It nearly caught the exact bottom which always impresses me. I let the algo do everything. I wanted to bail and/or take profit as soon as it dumped but I let it do its thing. I believe this was the largest move it ever captured. It was about 98c/share.

$CRTO 5 minute candles

Example backtest:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Starting backtest on $CRTO...
Retrieving intraday candles/ticks...
Retrieving daily candles...
Backtesting 08/01/2018...
[08/01/2018 09:50:00] Entry @ $26.41, target $25.41, stop $27.19 [ Bear Flag ]
Trailing stop: 27.19, 26.86, 26.52, 26.39, 26.21
[08/01/2018 10:10:00] Exit @ $25.38 [ $1.03 ]
P/L: $103.00
Gross P/L: $103.00 / $0.00
Commissions: $-4.00
Net P/L: $99.00
Win/Loss: 1 / 0 (100.00% / ∞)
Trades: 1 (0 long, 1 short)
Avg $ win/loss: $103.00 / $0.00
Best/Worst: $103.00 [ Bear Flag ] / $0.00 [ ]

Note the entry and exit is not exactly the same as the trade it took. This is due to it taking the trade on the exact tick that met the requirements to short and not with a 5 second delay.

If anyone is interested in this, here’s a few things I’ve learned:

I’m no expert and I’m still working on my algos so take this advice with a pile of salt.

  • MACD / moving average crossovers / other indicators are never going to work alone.

In hindsight they appear to work, but should only be used to confirm what you already know (aka a chart setup). One of my initial attempts at writing an algorithm used the MACD and it worked flawlessly on $ECYT but never anything else. I had to abandon that idea because I simply couldn’t filter out enough junk to make it work on multiple stocks.

  • Volume is very important for trading stocks.

Not just “minimum 100K traded on the day” but above average volume (aka relative volume greater than 1). IEX has a completely free API that can be used to retrieve the daily chart history for calculating relative volume. This will remove 90% of the bad trades alone. My algo trades significantly less since I’ve added this.

  • Range is also important.

What’s the point of trading some stock that has volume if it’s only moved 10c on the day? There should be decent range, at least 20c.

  • I threw out my old indicator based algos and decided to write code to identify chart patterns/setups that are likely to work.

So for instance the red to green move I mentioned above, that is a setup I’ve seen work over and over again and I use indicators to confirm the setup. It should be above VWAP and above the 9 EMA if it’s a long (or below those if it’s a short). If it meets all of the critera, it will take the trade.

This is what every “guru” teaches anyway, right? Chart patterns. Well, why not automate it?

  • Determining to exit a trade when it isn’t working is very important.

I look at multiple topping wicks / dojis / bottoming tails and multiple candles topping at a certain price to determine when it’s not working. Most of the time you get a nice bounce over your entry after a dip. So when the stock starts to top and can’t breakout of a range, you should just get out for a small win. This also prevents you from taking a larger loss because your stop wasn’t hit yet. When it bailed due to an exit indicator I have yet to see the setup go in my favor afterwards. The setup should work relatively quickly.

  • 1 minute chart is noisy and real time tick by tick candles are not necessary.

All of my intraday strategies work off the 5m chart with a delay of 5 seconds. There’s generally way too much crap happening on the 1m and if you try to algo trade off it, you’ll get stopped out all the time. Sometimes you have to give the setup time to work and 5m setups tend to be cleaner anyway.

  • Whole dollars reject and support all the time.

This is common knowledge and it’s psychology. I tend to target below a whole dollar for a long setup because they often reject or support. Also, I don’t buy or short near whole numbers for this same reason. If you short into a whole number, it’s probably a bottom or at least a temporary one that will stop you out. This has happened so many times that I had to add code to check for it.

  • Perfecting an algorithm takes time.

I’ll reiterate what I said earlier. No matter how clearly you define your strategy, you’ll most likely still end up with it taking bad trades because of something you forgot to check for. Especially since this is for stocks and you can’t backtest every single stock in the entire market over a period of months or years.

  • Backtesting is useful.

I had to write my own backtesting code to utilize TWS tick data and IEX daily candle data. It wasn’t too difficult and the results are very helpful. Once I fix a bug in a strategy, I try to go back to a previous pattern / stock it traded and make sure it still does the same thing. Also, you need to use tick data for this! Simply using candles only does not give an accurate entry or exit.

  • Trailing stops lock in profit.

Once you’re in a trade and up say, 50c, move the stop to break even + a few cents so you cannot lose. Afterwards, only trail the stop if a previous low, VWAP, or EMA is above your entry. This will help follow the stock up and maximize gains. This is something that can be done after you have a working strategy. This is where backtesting is useful.

  • Patterns occur on stocks of all price ranges.

My algorithms have traded stocks ranging from $3 to $50. The price doesn’t matter so long as you take the same percentage gain out of it. You can limit your max share size (100) and max dollar value ($2,000) in a trade to minimize risk when trading higher priced stocks.

  • Writing your own trading application can be done using the TWS API and free APIs from IEX and tiingo.

If I was not using IB, I would not be able to write my own algo trading application. I probably wouldn’t have even gone down this road if they didn’t have an API.



So that’s where I’m currently at. Refining algorithms so I can eventually trade them with real money in the future. I still want to get better at trading in general so I can make money that way without algos and write new algorithms based on new things I learn.

I feel like I should mention that I have not read a single book about algorithmic trading, yet. I bought an intro book by Kevin Davey after seeing a webinar he did for TradeStation. That will arrive on Sunday.

This took a while to write so if you found this helpful, consider sending me a tip:

BTC: 12BMo7nBeBhDGDGagwqSRPAv3fkQi8nCfq
BCH: qrjulqz4ceapc0fp2449apu6g769mef3j5std2sl9r
LTC: LVSmZByqa6Cp1BFwgqeUyMjKmpfHP23ApR
ETH: 0xd163fdde358f9000A4E9290f23B84DFb6E9190D3
ETC: 0x4c60D3527AE8ea7b2085E4E399C47361E8ddc04b
DGB: DT4KW5ZJ56vqayBdftjbTftsXwCXyymXK7



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Please remember that past performance may not be indicative of future results.

Learning to Day Trade - Part 18

Identify Trend Changes

The trend is your friend. I’m sure everyone has heard this saying at some point. Once a trend is established, it becomes much easier to trade. What I’ve discovered is: as soon as the trend changes, get in and go long/short depending on what the new trend is.

For this to work you have to be patient and not chase the new trend. Wait for the chart to develop and play the trend changes. If you can’t easily draw trendlines or the lines look too steep, then don’t trade them. It should be obvious.


On $TOPS, I first made a really dumb chase trade since I thought it’d squeeze and get up to $1.50 or so then top again. It didn’t, so I took 1c profit when it came back up. The trend was still in tact so I didn’t panic sell when it dropped. If I had noticed the first change to the upside I would have longed the breakout instead of chasing it that high. I immediately recognized this and knew it was a bad trade. Oh well.

A few minutes later, I identified another trend change based on the trendline I drew previously. The candle dropped really fast and I shorted when it came back up. I covered too soon but this trade was flawless.

$TOPS 1 minute candles

Next on $BBOX there was a huge spike/uptrend. I was unable to draw the uptrend on the 5m chart so that’s why you don’t see it here. It dropped and a new downtrend formed.

It changed trend again over about $1.52 and spiked into the premarket highs. Perfect. What you don’t see on the chart is it later dumped back to $1.46 at the open.

$BBOX 1 minute candles

Neither one of these were huge moves but these trend changes can occur on all stocks.


The next trading day (Monday) there wasn’t anything that crazy but there were some decent setups. $STAF had multiple descending triangles that worked perfectly. These pullback/continuation chart patterns work insanely well. So much so that there must be thousands of other traders drawing the same chart patterns and buying when they breakout.

I saw on Twitter that Roland traded the first entry that I marked. For some reason I rarely see people drawing these patterns when they post their charts. Maybe they don’t notice it and simply learned to recognize good entries.

$STAF 5 minute candles



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Hiding Symbols in ELF Binaries

Under Linux when you compile C++ code using GCC or Clang there ends up being tons of debugging information that simply should not be there when you are not releasing open source software. The strip command does not do enough to remove that information.

In order to do this you need to pass -fvisibility=hidden and -fvisibility-inlines-hidden to the compiler. This will hide symbol names and reduce the size of the binary. However, if you are linking to something like boost, you won’t be able to hide symbols for the entire binary. In that case, you need to create two header files to programmatically change the visibility of your .cpp and .h files.

visibility_hidden.h:

1
2
3
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#pragma GCC visibility push(hidden)
#endif

visibility_pop.h:

1
2
3
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#pragma GCC visibility pop
#endif

In every code file / header file you’ll need to do this:

1
2
3
4
5
6
7
... other includes
#include "visibility_hidden.h"
... your code
#include "visibility_pop.h"

After you compile your program, you should then run strip --strip-all --discard-all ... and also sstrip ... from ELF Kickers.

Here’s a quick Python script I wrote to add the headers to .cpp files on Windows. It will look for the stdafx include and insert the visibility include underneath it then add the pop header to the end of the file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
stdafx = '#include "stdafx.h"'
for name in os.listdir():
if not name.endswith('.cpp'):
continue
with open(name, 'r', newline="\r\n") as f:
text = f.read()
if text.find('visibility') != -1:
continue
idx = text.find(stdafx)
if idx == -1:
continue
text = text[:idx + len(stdafx)].strip() + "\r\n" + '#include "visibility_hidden.h"' + text[idx + len(stdafx):]
text += "\r\n\r\n" + '#include "visibility_pop.h"'
with open(name, 'w', newline='') as f:
f.write(text)

Learning to Day Trade - Part 17

Trendlines

Drawing trendlines on your chart is very important. Not just support/resistance lines but drawing lines connecting tops/bottoms of candles to form a trend. This can give you a decent idea of where the stock is headed when it breaks the trend. It will also allow you to easily spot different triangle patterns that lots of people trade. When it breaks out to the upside of a triangle, buy. And do the opposite when it breaks to the downside.


Today on $GBR there were multiple different flags and trend changes. I will go over each one individually. These are 5m candles because on the 1m there is way too much noise. I now mostly follow the 5m chart and only reference the 1m early in the morning to see what’s going on.

  1. Small dip at the open followed by a curl up and red to green breakout.

  2. Short pause that ended up being a red candle followed by a continuation. This setup is known as a “red bar ignored”. Several big green candles in a row followed by a red candle. Buy the next candle if it breaks the high of the red candle.

  3. Classic bull flag.

  4. Classic bull flag.

  5. Classic bull flag.

  6. New trend starts to form. In real time you would not know if this was another bull flag or a top. The candle lows are below the 9 EMA so that could be one indicator since all of the previous ones were all outside.

  7. Downtrend starts to form. Would not want to be buying here.

  8. Triangle starts to form.

  9. Buy the candle that breaks out of the triangle. Sell 1/3 or 1/2 position just below the resistance level that was formed in the down trend. If it ended up breaking to the downside, short instead.

  10. Another bull flag forms. Buy the first candle to make a new high, or ride the remaining shares from #9 up towards high of day.

  11. Support ended up forming and holding the previous drop level.

$GBR 5 minute candles

I ended up paper trading this and the circled entries/exits are my trades. $3.90 ended up being the high of the initial push so my exit was nearly perfect. I paper trade with 100 shares currently so it is realistic for when I use real money. If I had taken 500 or 1000 shares, selling half into the first push with a stop at break even would have been perfect.

Entry: $3.64
Exit: $3.88
Profit: 24c/share

In the morning I had TWS open with my live account and I did not draw any trendlines. That would have helped me find ideal setups to trade with real money.

Basically, DRAW TRENDLINES. THEY HELP.

I feel like I’ve always known they were useful but never drew them in realtime, until today.

Update

This stock was possibly manipulated by MintBroker buying up most of the float ($MTSL and $AWX as well). The patterns are still valid, but don’t expect to get ridiculous gains like this on each setup.

Identify Trend Changes



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

My Trading Problem

Ever since my large loss on $CALI, I’ve been more hesitent when I trade. I don’t know if it’s entirely caused by that one trade alone or because of the cumulative, yet small, losses that I’ve had in my IB account. The problem I’m faced with is entirely psychological. When I paper trade with the exact same setup in TWS, I do not hesitate to make trades and as long as I stick to patterns I recognize, I end up with decent gains even with 100 shares.

The problem seems to come down to risk management. I always try to determine my risk before entering a trade; which is obviously best practices. This ends up being a trap though since I generally determine there is too much risk (such as 20c to the downside, which is usually the low of a previous candle). I then do not take the trade and end up watching the setup play out perfectly. I always talk myself out of the trade by finding an excuse as to why it will not work: big spreads (5-10c), declining volume, huge 5m candle wick, time of day not ideal, etc.

I started watching “How to Think Like a Professional Trader” on YouTube. This part really stuck out to me:

(it has since been removed by YouTube)

If you didn’t watch the next 10 minutes of it, my main takeaway is this: you have to size down to the point where being wrong or losing money no longer matters. I thought 100 shares was small enough for me where I could focus on patterns and not care but it is not. On Monday I am sizing down to 10, and if that’s not enough I’ll go to 1.

After a few weeks of this I should be able to size up to 20 then 50 then 75 and hopefully back to 100 and just keep progressing slowly. I’m so glad I’m not under the PDT and the fees at IB are small. Every trade will still be a loss due to commissions but that doesn’t matter. Percent gain is what I’ll be going after when I post my trades, and I’ll be removing the dollar gain/loss from the chart. That way I can focus on just the chart and try to have good entries/exits.


Wednesday

I saw some “OK” opportunities on Monday and Tuesday but I either passed them up or missed them. Today I saw $GRPN had earnings and it had a nice morning panic. I waited for it to go green on the day (get over the open price) then I bought in with small size. My risk was down to the 5m 9 EMA or VWAP. I did not expect a huge move out of it and I got out when it couldn’t get over the premarket bounce at $5.50.

That ended up being perfect since there was a conference call at 10:00 that I was unaware of and then it proeceded to tank. I managed to stay in and not get faked out by the drop and captured almost all of the move.

$GRPN


That’s pretty much it for the week. I ended up paper trading on Friday for half the day and managed to make some money on $HEAR twice, and made a little on another stock that went red to green. Both worked out rather well. This weekend I’m going to work on my algorithm again with some new ideas.



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Watchlist - 04/27/2018

Selecting Stocks and Analysis

After the TI trial I unintentially took a week off. I need to fix my sleep schedule which appears to be very difficult. I’m just not tired at night and usually tired during market hours even if I get enough sleep.

I’m not totally convinced TI is worth it since every stock that showed up in any of the scans was not really doing anything. I do find it useful for finding % gainers at the end of the day. That is completely free if you sign in using a demo account.

Anyway, I managed to take 60c/share out of $AMD thanks to the earnings spike after hours. I wanted to sell before the close but I was red so I decided to just hold until green. I got lucky. I tried selling it into the fast $10.30 spike but I couldn’t because of open orders not being canceled at Ally Invest. I had to call up the broker to cancel the orders then have them place the sell for me. It was really scary since I know $AMD tends to spike then drop hard. It didn’t this time and kept going so I sold too soon.

I intend to rebuy again if it crashes into the $9s due to market conditions or perhaps an earnings run up like this time. Except next time I’ll take the 30-50c/share immediately if I get it.



$GNPX

Recent IPO. Shouldn’t have many bag holders. Could have support near $10.00.

Shares outstanding: 16.07M

$IPI

Multiday breakout over $4.88.

Float: 80.64M
Short: 9.68%

$EYPT

Earnings.

Float: 43.17M

$VTVT

Still holding up. Support at $1.70.

Float: 6.82M
Short: 25.11%

$AMD

Not planning on actively watching it. If it has a morning panic or finds support at $10.75 again I’ll consider taking a position.

Float: 963.98M
Short: 18.87%

Watchlist Review

Didn’t really see anything amazing.

$HEAR had a perfect 5m dip buy setup but I was not watching it.

$IMGN had news and had a decent 1m setup then a high of day breakout near $11.80.

$I double topped nicely but that one is so choppy.

$AMD dropped to $11 then had a grindy bounce.



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Watchlist - 04/23/2018

Selecting Stocks and Analysis

Crypto is hot again so certain crypto related stocks will be heating up.


$I

Refuses to breakdown. It is starting to get close to a $9.70 breakout but I don’t trust it. If it can find some support without being choppy I’ll consider it.

Float: 116M
Short: 9.30%

$SIEN

FDA approval news. This will be the 3rd up day if it manages to go green. The 1m chart has been very choppy.

Float: 18.83M
Short: 11.25%

$XNET

Bitcoin sector. Coincidentally also has fresh Bitcoin news.

Float: 63.82M
Short: 18.43%

$CANN

It tried uptrending again the past few days but now it looks like the run is over since it made a lower high on the daily.



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Watchlist - 04/18/2018

Selecting Stocks and Analysis


$VTVT

Terrible long term chart but now it’s above $1.01 so it may be filling the gap.

Float: 9.55M
Short: 2.58%

$I

Float: 116M
Short: 9.30%

$ARQL

Getting close to a breakout over $3.35. Support at $2.50.

Float: 70.1M
Short: 1.69%

$DCAR

Earnings. Extreme low float with high short % according to finviz.

Float: 0.44M
Short: 64.46%

$CANN

Finally got a panic yesterday but the bounce was weak.

$FUSZ

Still on watch for a morning panic.

Watchlist Review

I didn’t really see anything that great except for $VTVT which went straight up. $I had a VWAP pullback but I missed it.



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Watchlist - 04/17/2018

Selecting Stocks and Analysis


$HMNY

Has the potential for a short squeeze.

Float: 10.6M
Short: 54.28%

$I

New 52w high but starting to get really overextended on the daily.

Float: 116M
Short: 9.30%

$CRON

Always ends up being really choppy in the morning. Held VWAP pretty well several times though.

Float: 115.32M
Short: 3.66%

$CANN

Weed stocks are back on Canada legalization. This stock has had big morning panics in the past so I’ll be looking for that.

$FUSZ

This is somehow still hanging on. Watching for big morning panics but this one tends to not panic big - at least recently.

Watchlist Review

I was not here for the open since I was too tired.

$HMNY had a perfect opening range breakout. I was thinking last night it might be a good overnight long but it’s such a terrible stock. It gapped up slightly then opened lower and had the ORB.

$I had multiple spikes so it could have been played both ways.

$CRON and $CANN had panics in the morning. $CANN really failed to bounce much and just went sideways.

$FUSZ had a small panic where the bottom dropped out to $2 then it recovered quickly. It just doesn’t want to crack.

Luckily my $AMD buy on Friday was pretty solid. It seems $AMD is now in an uptrend. I plan on selling the day of earnings some time before the close.



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Trade Ideas - VWAP Scan

The basic idea behind this strategy:

  1. Buy after it breaks above VWAP and holds it, risk a few percent below VWAP.
  2. Buy after it has been rejecting VWAP for several candles and finally gets above, risk a few percent below VWAP.
  3. Short after it drops below VWAP and rejects it, risk a few percent above VWAP.

It’s not always obvious as to what you should do since each trade is unique.

If the stock is up a lot on the day, look for it to come down and test VWAP. If it breaks down through, wait for it to pop up and test VWAP. If it holds: long, if it rejects: short. Note that it can break a few cents above VWAP and then come down.

The opposite works if the stock is down a lot on the day. Wait for it to bounce into VWAP. If it breaks through and holds: long, if it comes back down and rejects: short the pop.

Not all stocks will follow VWAP so it mostly comes down to experience and how the chart looks. Avoid choppy/illiquid stocks and ones that have large 5m wicks. It seems to work best before 1:00 PM EST.

Here is the cloud link to the current scan that appears to find what I’m looking for. I made this with the demo account and modified it during the 5-day trial period. I’m sure I will tweak it in the future.

Unforunately VWAP does not appear on the charts accurately (with 4.2.28). It’s a known issue and they are working on it. Scanning is perfectly fine though.



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.