Neural Market Trends

Current Status: Self Isolating

Updated Forex Charts with Bokeh

Just updating my past post on autogenerating support and resistance lines for the EURUSD. I've updated the charts to use Bokeh, a nicer and interactive set of plots. You can zoom in and see the candles at various price levels. I still need to do more labeling work on the charts as I learn how to use the Bokeh library. The thing that's hanging me up right now is how to correctly label the horizontal support and resistance lines (aka as Spans in Bokeh) with the actual value. The other thing I need to do is add a legend. Red means resistance and Green means support.

The charts work on 2 years of data with a 20 day look back period for generating the support and resistance lines. In the future I want to optimize the look back period using some other method. What method? I don't know but that's on the back burner until I figure out how to generate a single webpage with the charts loaded into them.

In case you want to see what gets autogenerated every Saturday morning, you can click on the EUR_USD, USD_JPY, and GBP_USD currency pairs. If there any other ones you want to see, drop me a comment below and I'll add them.


I added the expected returns for a momentum startegy to each currency pair chart. The idea is to see if you can be profitable with momentum trades over 15, 30, 60, and 120 days. Some results are very interesting. I have a Momentum Trading Bot all built and ready to go. I just need to set up my Oanda account correctly and then I'll start 'practice' trade it.

I also added some stockcharts for MSFT, GOOG, AMZN, DATA, AAPL and NVDA. These get updated daily and they're for a 15 day time period. Same as above, green color is support and red is resistance.

Some Crypto Currency support for BTC and XRP. Still a work in progress!


Morgan Stanley Layoffs, VTI keeps climbing

Yesterday Morgan Stanley announced a 2% reduction in workforce across the entire organization. It's citing an "uncertain global environment." That's a code word for "recession" if you ask me.

The job cuts at the investment bank, the world’s biggest equities trading firm and a leading mergers advisor, will hit technology and operations roles hardest, said the people, who declined to be named. New York-based Morgan Stanley had 60,532 employees as of Sept. 30. via CNBC

Or it could just be they don't want to pay all those bonuses. Either way, you don't lay off in good times. You usually hire to keep the party going. It's when the party is winding down that you start kicking people out.

That said, Vanguard's Total Market Index (VTI) is still charging higher. There's a bit of a top forming in the daily chart but I suspect the party will continue.

VTI Weekly Chart, 12/09/2019

“As long as there is still room for pushing the market interest rate down further, the chances are reasonably good that the boom continues, and that the bust will be adjourned into the future... via MarketWatch

Of course, the market is still going up so it will continue to go up. Until it doesn't. Usually I'd be scared of all this "market going higher" and "bust will be adjourned into the future" talk, but I'm not. The market's going to do what it's going to do and not a moment sooner! I tried market timing and all that jazz, only to realize that doing less = more gains for me. Strange how that works, but it appears to work just fine.

Granted, I don't have any holdings in VTI (maybe one day when I consolidate all my retirement accounts) but it is an impressive ETF. Especially if you look at the expense ratio. It's only 0.03%!

VTI Expense Ratio, December 2019

If I were to invest in this ETF I would split up my money into equal parts and dollar cost average in. Keep your transactions costs and expenses low. If you can't, then ditch the ETF for the VTSMX mutual fund where it probably won't cost you anything to cost average in or reinvest dividends. Passive Investing remains King in my book.


Weekly Support and Resistance Updates to EURUSD

Over the years I've used  as my development sandbox. Sometimes it was to test out new CMS's (like Expression Engine) and other times it's cron jobbing scripts. For the most part, it's cron jobbing scripts. I started thinking about using  that site as a Django dev site a few months ago. I'd like to learn how to build a website from scratch using Python and Django and thought this would be a good place as any. 

The goal is to build a simple dashboard where a user can enter a  currency pair and get some results. My current script only generates support and resistance lines for the EURUSD pair. It updates once a week on Saturdays. Mind you, the formatting of the graphic is terrible and how I link to it is worse. Like I said, this is a sandbox.

I want to transition the graphic to a better open source visualization library. One idea is to investigate using Bokeh which has nice interactive visualizations. I don't expect this project to move at lightspeed, it'll move at a glacial pace over the next few months or years. 

If you want to see the weekly updates of the EURUSD pair, go here.


How to Recognize AI Snakeoil

My colleague posted an interesting Princeton presentation to our group Slack channel. It's about how AI is being used in social interactions such as hiring decisions. I completely get why HR departments and companies want to do this. They get 100's of resumes from people and want to weed through the lot of them to get to the right candidates. This is how AI can help, optimizing processes to assist people to make the right decisions.

For example, AlphaGo is a remarkable intellectual accomplishment that deserves to be celebrated. Ten years ago, most experts would not have thought it possible. But it has nothing in common with a tool that claims to predict job performance. via Princeton

AI can scan an applicant's resume for keywords and rank job hunters based on the universities they attend, but it can't discern the human factor. You can be socially awkward but excel in your field. You can be great on a paper and have all the right credentials but be a complete asshole. AI can't predict the subtleness of being a human.

Princeton AI Snakeoil Presentation

As AI is being used in these social interactions more and more, people are starting to game the system. Applicants are scrutinizing job applications and hiding in white text words like "Cambridge" or "Yale." Humans can't read it and it's not there when you print it out, but a computer can read it in digital form. This skews the results, in your favor.

I already showed you tools that claim to predict job suitability. Similarly, bail decisions are being made based on an algorithmic prediction of recidivism. People are being turned away at the border based on an algorithm that analyzed their social media posts and predicted a terrorist risk

Another big problem I see is how AI is being used to assist in judgment. These have big consequences if you happen to share similar 'features' of a terrorist or criminal. This goes to the notion that fairness is hard and that human lives are messy. Our Judicial system uses these systems to 'predict' whether to deny someone bail. There have been cases where these systems aren't fair at all. Gender bias is another big thing. The recent high profile Apple Card credit limits highlights potential gender bias.

What can we do in this brave new world to fight these problems? The first step is awareness that there is a problem. The next step then is to use the same technology to solve the problem. Then track the system to make sure it's not gamed and fair.


Go Master Quits, AI too powerful

I just read that Lee Sedol is retiring from the competitive Go world because of AlphaGo.

The South Korean said he had decided to retire after realizing: "I'm not at the top even if I become the number one."

This is a bit sad but understandable. I wrote about Lee's historic match with AlphaGo a while ago. He ended up losing four matches out of five, which was an ass-kicking for the #1 Go player in the world. Just think about it, AlphaGo from Deepmind is just getting better and better.

What is Go?

If this is the first time you're reading about Go, then you probably don't understand the importance of this particular AI beating a world champion. Go (aka Weiqi) is an ancient Chinese game that is about getting territory on a board made of 361 intersections.

You place these black and white stones at the intersections and then build 'territory.' The person who has the most territory after all moves are complete (or resigns), is the winner.

Wikipedia defines it:

Go is an abstract strategy board game for two players, in which the aim is to surround more territory than the opponent. The game was invented in China more than 2,500 years ago and is believed to be the oldest board game continuously played to the present day. A 2016 survey by the International Go Federation's 75 member nations found that there are over 46 million people worldwide who know how to play Go and over 20 million current players, the majority of whom live in East Asia.

It's been said that the combinations of Go moves is greater than the amount of atoms in the universe. I'm not sure if that's correct but the lower estimate of moves is somewhere around 2 × 10^170. So you can understand why AlphaGo beating a human is so powerful.

I've played it a bit of Go over the years and got to about 14 Kyu level. I don't play competitively but I enjoyed a few friendly games and have played against a few Dan level players. They expertly wiped the board with me with such grace and humility. It was a thing of beauty to see how they lead me into traps 20 and 30 moves ahead.

Why you should play Go

I recommend that every parent expose their kids to both Chess and Go, these type of games are awesome for strategic thinking and teaching patience. I believe it helps wire their brains in ways that become apparent years later.

I don't get much time to play Go now, but perhaps over upcoming holidays I might play a game online or with my children. If you wanted to try it out, go check out the KGS Server or buy a simple board from Amazon. Let me know how you like it.


Neural Market Trends is the online home of Thomas Ott.