Trading Tools – Stock Price Decline Checker

Stock Market Trader Desk
Stock Market Trader Desk

As a trader and investor, I’m constantly trying to make profitable stock trades and invest more wisely. I’m primarily looking for ways to increase returns, decrease risk, and to make smarter decisions.

One of the ways I make better trades and invest more wisely is through the use of various trading and investing tools. There are many great tools and web sites out there to help trading and investing research, such as R, Yahoo! Finance, Google Finance, and Wolfram Alpha, to name a few. Sometimes I’ll even create my own tools to use.

One of the tools I’ve created is the Stock Price Decline Checker which you can find on my GitHub.

The stock price decline checker tool checks a list of stocks to see if the price has declined a certain percentage from its maximum price over a specified number of days.

The goal is to identify primarily index ETFs that have declined substantially in price from their maximum values over the past few weeks or months, which could potentially signal a buying opportunity.

One way I use the stock price decline checker is to see if index ETFs such as QQQ, SPY, or DIA have declined significantly from their max prices over the past 2 months. To be more specific, I’ll run the stock price decliner checker to check if the index ETFs have fallen over 7.5% over the past 50 days. This kind of fall would indicate a substantial drop in the overall market price, such as a market correction, and to me this could signal a good buying opportunity.

Here are some links to my other trading and investing related web sites and tools:

Auto-scale Rackspace Cloud servers with Fabric and Celery

Auto-Scaling Celery Workers with Rackspace Cloud Servers

Python logo
Python

I have been working on an automated stock trading system for some time. Part of my automated trading system involves a lot of number crunching and calculations, such as for technical analysis and neural networks. Processing large amounts of data for thousands of stock tickers can be very time consuming and take a significantly long time to fully process the data. I have begun creating additional worker nodes so that I have more processing power available in order to complete the data processing and number crunching much faster.

I have created some tools to help me manage these additional worker nodes and simplify the scaling up and scaling down of the data processing workers. My tools will automatically scale up worker nodes using the Rackspace Cloud Servers API and then start my python celery workers to crunch the data and process the tasks in my rabbitmq queue. When the processing has been completed and the tasks in queue are zero, the auto-scaling script will spin down and destroy the worker cloud servers.

The auto scaling tool checks my rabbitmq queue size and if there are a large amount of tasks in the queue, it will create a number of cloud servers using the Rackspace Cloud API and an image template I have created and saved at Rackspace Cloud.

Basically it works like this:

  • Each worker instance is built from a template image, so it has the exact same packages and code base.
  • If the queue size is very large, then create a bunch of workers.
  • If the queue size is 0, then delete the additional workers, to save money by removing instances we’re not actively using.

I’m using Fabric for python to create the celery worker servers. The celery workers then work on tasks in a RabbitMQ messaging queue. Fabric is a very powerful tool that can run commands automatically on the newly created servers. I am also using the python-cloudservers python package to interface with Rackspace Cloud API and create the servers. After the servers are created, I’m using rsync to copy over my code base to the newly created cloud servers. Fabric then starts up the celery worker daemon on the newly created worker nodes. The celery daemon on the worker then takes care of the rest and starts processing the tasks.

The script I’m using to auto-scale up and and down is a custom script I have written. It runs the auto-scale.py via a crontab entry on my primary/master processing server.

You can find my scripts and code at github:

My crontab entry for auto-scale.py:

*/5 * * * * /usr/bin/python /opt/codebase/autoscale-rackspacecloud-fabric-celery/auto-scale.py >> /tmp/auto-scale.log

Book Review: Trading In The Zone by Mark Douglas

“Master the market with confidence, discipline, and a winning attitude.”

Here is a snippet from my review of Trading In The Zone by Mark Douglas, found at my trading blog Trading Winner:

Trading In The Zone by Mark Douglas examines the mentality and psychology of successful and unsuccessful traders, understanding our trading actions, and shows us how to strengthen the psychological aspect of trading. “In Trading In The Zone”, Mark Douglas shows you how to analyze your mental strengths and weaknesses when you make trading decisions. He then shows you how you can correct flaws in your trading mentality and habits. The ultimate goal of Trading In The Zone is to eliminate trading based on emotions.

Read my full review of Trading In The Zone

How I Started Trading Stocks – Part 2

For those interested in stock market trading and investing, I have written part two of a series detailing how I started trading stocks. The article is How I Started Trading – Part 2. This article can be found at my stock market trading blog: Trading Winner.

In case you missed the first part of my introduction to stock trading and investing, you can find it here: How I Started Trading – Part 1.

How I Started Trading Stocks – Part 1

Someone recently left a comment on my Trading Winner blog asking how I got started in the stock market. They are a beginning trader and they were interested in how other traders and investors learned and developed their trading and investing knowledge and skills.

In response this persons request, I have published an article on Trading Winner titled “How I Started Trading”, which talks about the history behind my business, finance, investing, and trading life and experiences. Check it out and leave me a comment letting me know how you got started in the stock market!

Read the entire article: How I Started Trading at Trading Winner.