# How to generate optimized parameters?

I'm trying to write a program that would help me make wiser decisions for stock trading.

I've built my logic, which is made of two sub-logics. The first is a general logic - Targeting the stock data (mostly pattern analysis). The second is personal behavior logic - Targeting the personal playing behavior (how risky to be and such).

Together, those logics are dependent on ~15 parameters defining the trading behavior. (e.g. number of symbols to hold in the portfolio, percentage of cash to use, share prices smoothing parameters, etc.)

I've built historical simulator to test the logic against historical stock market data. The simulator generates:

1. Random starting date
2. Random run period
3. N different random players

Each of the N players is a essentially a collection of the parameters, where each is being assigned a random value (within, of course, legal values boundaries).

Then I let the simulator run, and at the end of the run I save all the data into a database. I let it run many times, generating many different players at each run. Each entry is made of something like (start_date, end_date, general_params, personal_params, initial_value, final_value)

My goal is to find a collection of parameters (both general and personal), that would maximize the final_value, regardless of the start_date and the length of the run.

I've tried in a previous iteration of the project some naive approach of finding maximum by running many times, identifying the configurations which, in general, out performed the others, and then attempted to hold all the parameters except a single one. modify that one a little (+-0.1% each time) and see if I get a better outcome. After finding local maximum, moving to the next param and so on. It was a very time consuming process (it takes approx 30 seconds / player / history day) and it didn't bring me anywhere. The final player did ok but very often, other randomly generated players did much better.

I've done some research into SGD, optimization problems, linear models and generative models, but honestly, I consider myself to be quite newbie in this field and would appreciate your educated thoughts on the matter.

How would you recommend me to transform the data collected in my DB to a set of parameters which is optimized for the problem?