Test
This commit is contained in:
@@ -2242,7 +2242,7 @@ int64_t komodo_pricesmoothed(int64_t *correlated,int32_t numprices)
|
|||||||
|
|
||||||
int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int32_t daywindow)
|
int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int32_t daywindow)
|
||||||
{
|
{
|
||||||
int32_t i,j,iter,correlation; int64_t price,sum; uint32_t refprice,lowprice,highprice;
|
int32_t i,j,iter,correlation,maxcorrelation=0; int64_t price,sum; uint32_t refprice,lowprice,highprice;
|
||||||
if ( daywindow < 2 )
|
if ( daywindow < 2 )
|
||||||
return(-1);
|
return(-1);
|
||||||
for (iter=0; iter<daywindow; iter++)
|
for (iter=0; iter<daywindow; iter++)
|
||||||
@@ -2273,6 +2273,9 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( correlation > maxcorrelation )
|
||||||
|
maxcorrelation = correlation;
|
||||||
}
|
}
|
||||||
|
fprintf(stderr,"ind.%d iter.%d maxcorrelation.%d\n",ind,itermaxcorrelation);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user