« February 2006 | Main | January 2007 »

March 03, 2006

Hi, guys

4:15 AM and I feel ALOT better about the site. The admin panel now works almost perfectly, just one query doesn't really do what I want to, but I think I know how to fix it. I also added in some data into the DB just to get things started again. Now that things are almost done, I'm actually pretty pleased with the way things turned out. The site doesn't look TOO horrible, and the programming is actually pretty decent. There are a few things that could be faster, but overall its pretty good, and like I said its not too bad, since a) the really inefficient functions are only accessible by the administrators and b) its not my damn box I'll be hogging, and way. The ones for the users are about as fast as they're gonna get. Yeah, pretty pleased. I can actually get on to something useful now, and update this thing and the code that drives it when I get bored. Part of the reason that it took so long is that I built things with new scalability in mind. Everything I'll write on the backend now is basically with an eye towards automation, with the goal that eventually I'll just give it a list of every stock Cramer ever recommended and have it model the fund from day one. That will be sweet. Till then, let the games begin.

But whew, like I said, alot of work. over 1500 uncommented lines of code. I hate to admit it, but my programming skills were somewhat rusty. But the upside is, they are MUCH sharper now. PHP, for all its flexibility, can be a VERY quirky language.

Posted by The Contrarian at 04:16 AM | Comments (0) | TrackBack

March 02, 2006

Fuck it.

The database has been cleared. The game starts tonight. I'll make buys tommorow based upon what he says tonight. kthanxlaterbye.

Posted by The Contrarian at 05:20 PM | Comments (9) | TrackBack

New rules

I'm tired of being nice. If I have to rebuild the entire database, we short at the opening price the day after.

Posted by The Contrarian at 04:37 PM | Comments (790) | TrackBack

Wow

Wow this thing took alot longer than it should have. ALOT longer. But, all that being said, the basic functionality is all now in place. I can buy and sell securities at any date in the past. Adding that functionality was key because someday I hope to automate this thing so it basically can run itself. I hit one button and it looks up all the data for the past, say, week, and enters it all into the database, does the calculations, etc. As it is now there still is a fair degree of manual labor involved. I have to enter each stock symbol, and then the date I want to buy and sell it if its not the latest one.

Anyway, all that being said, this bitch is pretty much done. It would be nice to have a 'transaction history' thing in the history tab; as of now it basically just replicates the functionality of the portfolio tab. Also, I will need to figure out how to get the charts working. To do that I will need to write a function that calculates the value of a given fund day by day. That's not nescessarily hard, and probably just involves just smashing two other functions I wrote together, but it is, you know, one more thing. There are also several optimizations I know I could make, but again that's just not worth the time right now, and anyway its not like its MY server I'll be chewing the clock cycles of.

But again, I need to put this on the back burner for a few days. Other priorities. It currently weighs in at over 3MB, and that's with almost no graphics, as I'm sure you can tell. I personally wrote almost 1,500 lines of code for this beast. And that doesn't include, of course, modifying hundreds of line of Movable Type HTML and CSS code so that it worked happily with my PHP. I started out with this cute idea of "It'll be easy: a couple databases, some forms, bing, bandg boom, done." Ha. I eneded up basically implementing an entire brokerage package.

I'm going to plug all the data of the past few weeks in now to see if its been worth it. Luckily, the market's been down the past few days. Cross your fingers.

Posted by The Contrarian at 02:53 PM | Comments (0) | TrackBack