Skip to content

Enrique Garcia

General musings from someone in over their head

Menu
  • Home
  • Program Journal
Menu

Hit and miss coding

Posted on August 30, 2020August 30, 2020 by Enrique Garcia

As I mentioned previously, I’m not an expert coder or programmer. I’m almost entirely self-taught, what I haven’t learned on my own I’ve learned via more experienced friends that I bug all the time. I use what I like to call “brute force” programming, that is, while I may be able to get my code to do some complex things, it’s by no means an elegant solution. IF/ELSE and FOR loops are my friends. Kind of “hit and miss” coding, a lot of “let’s see what this does”.

By the same token, my methodology on programming my stock market script is very much a lot of trial and error. More complex systems like those used by commercial stock market programs or high-frequency traders I’m sure use complex formulas and algorithms to make their decisions, whereas I’m merely looking for a more literal and particular set of conditions to be met, to determine what action to take. Perhaps technically we’re both trying to find the same thing, but I’m sure my way is more black & white than the experts’.

To that end, after updating my code to switch from conditional decision making to a score-based system, I’ve seen much better results for the most part; however the results all around are more extreme, while some stocks that were already doing well are doing better, other stocks that were doing poor are doing much worse. I started tweaking some things and the results were just all over the place, it didn’t seem to do better in any particular direction. So I’ve had to kind of deconstruct a good chunk of the main script and essentially start over on the decision-making portion.

But this time I’m being a bit more methodical. Rather than simply seeing stocks “mostly doing somewhat better” with each iteration of my program, I’m now keeping track of the results. It’s by no means scientific or thorough, but it gives me a starting point to work with. As you can see in the graphic, I’ve started with the most rudimentary metric, which direction the prices are going, and then build up from there. I’m quite pleased with the results so far. The stocks I’ve selected for now are based off this list I found online (“5 Most Consistent Stocks“), tomorrow I’ll be running through the 30 Dow Jones stocks to see if everything holds up, and I’ll continue to use that as my metric to see how well my code does against the DJIA.

Leave a Reply Cancel reply

You must be logged in to post a comment.

Archives

  • August 2021
  • July 2021
  • June 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • September 2018
  • June 2018

RSS Finance News

  • U.S. natgas futures wrap up biggest monthly decline in 22 years
  • Snap earnings call: Improvements will take time to hit top line, CEO says
  • Diabetes drug developer Structure Therapeutics sets terms for $125M US IPO
  • Why did CureVac stock slip today? Declining market for COVID vaccines
  • AMD CEO Lisa Su: Company in a 'good position' for data center gains
  • Stoneridge appoints former Aptiv executive Jim Zizelman as president, CEO
  • S&P 500 hits the ‘January Indicator Trifecta,’ giving it perhaps 100% odds of 2023 gains

Trading Websites

  • Master the Market
  • QuantiInsti’s Blog

Recent Posts

  • Latest program update going very well!
  • First big program update all year!
  • It’s been a minute…
  • The major overhaul continues
  • Major program changes now in progress

Tags

AAPL Apple coding collectibles comic books data sources diversification Dow Jones ETF GME ideas insights investing IRIX KRP marijuana methodology MGY MYCNX NASDAQ NVAX opinion preferred stock programming progress project stock market TGIF troubleshooting TXMD wallstreetbets
©2023 Enrique Garcia | Built using WordPress and Responsive Blogily theme by Superb