genetic Algorithm fitness function for stock market pridiction - artificial-intelligence

i have been working on stock market prediction for couple of months but could not find any relevant information. i googled it and found some research papers but unfortunately they only mention the working of genetic algorithm. which i already know .
i need to design a fitness function to predict stock market
i have already get the real data from stock market
Open High Low Close Volume
253.8 255.8 253.8 255.8 809300
250.8 250.8 243.05 247.8 2041000
248.1 254.9 248.19 254 4550500
254 261.39 252.35 259.54 9926000
259.54 260.60 253.5 253.94 5425700
253.94 257.25 248.05 256.10 7504500
256.1 258.35 248.30 251 10933400
251 253.64 249.25 250.44 5478500
250.44 252.89 248.60 252.25 6316600
252.25 254.85 252 254.05 6332500
254.05 255.35 252 252.25 6961600
253.5 259.5 253.5 259.25 10216200
259.25 260.20 257.10 257.89 6071400
can anyone please help me to get a relevant fitness function

Your fitness function would be how close your predictions were to the actual. So you've got your population of agents who are predicting tomarrow's prices. Like, agent #12683 goes through his model and predicts that the price of eggs will be up 0.5% tomorrow. You take their predictions (+0.5%), subtract them from the actual prices, and take the absolute.
A score of zero is perfect.
You'd use historical data to provide a learning set on.
And you'd be a decade behind the quant-devs who have already done this and a few years behind the quant-devs who gamed those systems to make a buck. Welcome to the stock market.

Related

Add predictor to model quantile function in Tableau

Does anyone know how to get a model quantile function to project into future using a predictor variable/measure? I have support ticket volume I'm trying to predict using previous months and another measure.
MODEL_QUANTILE(0.5,SUM(Volume),ATTR(DATETRUNC('month',[fiscal date])),SUM(Time / User (min)]))
If I take out the last predictor (Time/User) it produces a smooth curve into future, but only gives me until this month if I have it in. Both measures stop at this month, and I've tried "Infer Properties from Missing Values" and "Extend Date Range"

How to skip rows with the same values

I have the following problem: I have a dataset with over 1million entries (shown below), that includes the variables company (=Name of the company (string)) and reviews (=amount of reviews a company received) and company1 (assigns numeric to specific company name). Now I want to calculate the average amount of reviews a company in the dataset receives. But if I just do sum reviewsthen it will count the amount of reviews of company 3 two times, the amount of reviews of company five 23 times etc. (as often as they are listed in the data). How do I avoid this and only count them once?
Your image is not readable (by me on a laptop). The Stata tag wiki gives detailed advice on how to give data examples and the command dataex bundled with recent versions of Stata is easily used for SE.
The flavour of your request is easier to follow. Here is an analogue. With the Grunfeld data we can calculate a mean investment for each year.
webuse grunfeld, clear
egen mean = mean(invest), by(year)
Now we might want to know how many years had mean invest above 200 (in the units used)?
su mean if mean > 200
or
count if mean > 200
returns the number of observations (not years). If you try it, the result is 30. In the Grunfeld data, there are 10 companies each measured for each year, so dividing by 10 is an easy answer. For more complicated datasets, it would better to tag each year just once, and then look only at tagged observations:
egen tag = tag(year)
count if tag & mean > 200
It would be more common to tag panels, not years, but the principle is the same. See the help for egen.
collapse and contract offer other routes, with or without using frames.

Is there a dataset for products (UPC/EAN level) and their recycling information?

I am looking to do some analysis around plastic recycling and interested to know if there is any dataset that gives recycling information for products sold in US. For ex: a product with UPC/EAN number has a resin code of 1 (number written at the bottom of a plastic container). If you have any ideas on how to start creating it will be helpful as well. I understand there is something out there that gives information of a general 1 gallon milk container but I am looking at information on a brand/manufacturer level.
Thanks

Forecasting 5 Day Sales

I have daily sales data between 2013-02-18 to 2017-02-12 that has only 4 days of data missing (all the Xmases on the 25th of each year). These holidays have a sale volume of zero. My purpose is to understand how to staff my store for the upcoming week by short-term predicting my sales for the next 5-7 days worth of data.
I start by setting up this data as a time series:
ts <- ts(mydata, frequency = 365)
and then an initial analysis through a decomposition:
This seems to show I have a declining sales trend, but there is some seasonality, if I'm not mistaken. So, to start my forecast implementation, I fit an arima model for the first two years worth of data by doing:
fit <- auto.arima(ts[1:730], stepwise = FALSE, approximation = FALSE)
Series: ts[1:730]
ARIMA(4,1,1)
Coefficients:
ar1 ar2 ar3 ar4 ma1
0.3638 -0.2290 -0.1451 -0.2075 -0.8958
s.e. 0.0413 0.0388 0.0388 0.0398 0.0241
sigma^2 estimated as 15424930: log likelihood=-7068.67
AIC=14149.33 AICc=14149.45 BIC=14176.88
This model doesn't seem right to me, because it does not include any seasonality. I know I have enough data. Rob Hyndman's blog said to try using ets which also showed no seasonality. What am I not understanding about this data series or the forecasting methodology?
I've re-asked this question more appropriately in the stats exchange forums. Could someone please close this question here in stackexchange for me?
The questions is now here.
https://stats.stackexchange.com/questions/295012/forecast-5-7-day-sales

User search pricing calculation

I'm building a search engine which provide me a list of cap drivers. We have some requirements:
User is searching cheapest cap driver to bring him from place a to place b. He can go from any place to any place.
Default formula would be distance * price per mile
But there are also special prices like AMSTERDAM to THE HAGUE would be always 100 EUR
The price for each mile is season based winter/summers have different prices.
Faceting search based on attributes. Like is there Champagne/Luxory/Male/Female driver/Etc etc.
User want's to sort on cheapest ride/but also distance.
What would be the best approach to fit all there requirements? I've tried Solr but have not found a good solution for putting the price modal in there. Any ideas?

Resources