Portfolio Optimization
post/portfolios/optimization/supervised/nearest-neighbors-based

Request

  • Base URL
    https://api.portfoliooptimizer.io/v1
  • URL
    https://api.portfoliooptimizer.io/v1/portfolios/optimization/supervised/nearest-neighbors-based
  • Auth
    API key in header X-API-Key

Request body

assetsinteger required

The number of assets

nearestNeighborsForecastMethod'kMean' | 'kStar' | 'kEnsemble'

The forecast method used to determine the label of an inference point

nearestNeighborsinteger

The number of nearest neighbors used to determine the label of an inference point when nearestNeighborsForecastMethod is equal to 'kMean'

nearestNeighborsDistanceMetric'euclidean' | 'hassanat'

The distance metric used to compute the nearest neighbors of an inference point

Response

OK

Changes