This commit is contained in:
jl777
2019-04-02 11:04:32 -11:00
parent 79120f3cac
commit 8adcc5022c

View File

@@ -2315,7 +2315,7 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int
if ( (price= nonzprices[i]) != 0 ) if ( (price= nonzprices[i]) != 0 )
{ {
den += (daywindow - i); den += (daywindow - i);
sum += ((daywindow - i) * (price + firstprice*9)) / 10; sum += ((daywindow - i) * (price + firstprice*4)) / 5;
n++; n++;
} }
} }
@@ -2382,11 +2382,11 @@ int64_t komodo_pricesmoothed(int64_t *correlated,int32_t daywindow,int64_t *nonz
smoothedden = 64; smoothedden = 64;
for (i=0; i<7; i++) for (i=0; i<7; i++)
{ {
fprintf(stderr,"%.4f ",(double)smoothed[i]/10000); //fprintf(stderr,"%.4f ",(double)smoothed[i]/10000);
smoothedsum += coeffs[i] * smoothed[i]; smoothedsum += coeffs[i] * smoothed[i];
//smoothedden += (7-i); //smoothedden += (7-i);
} }
fprintf(stderr,"-> %.4f\n",(double)(smoothedsum/smoothedden)/10000); //fprintf(stderr,"-> %.4f\n",(double)(smoothedsum/smoothedden)/10000);
return(smoothedsum/smoothedden); return(smoothedsum/smoothedden);
} }
return(0); return(0);