action portfoliooptimizer_post_assets_prices_adjusted { label: "Adjusted Prices" description: "Compute the backward-adjusted prices of one or several asset(s) for one or several date(s) from:\n* Unadjusted prices\n* Capital distributions, like stock dividends\n* Splits, like stock splits\n\nThe adjustment base date is chosen to be the last date for which unadjusted prices are available, which implies that:\n* The price on the last date for which unadjusted prices are available is left unadjusted\n* The price on any other date is adjusted based on the capital distributions and the splits which occurred between this date and the last date for which unadjusted prices are available\n\nReferences\n* [Center for Research in Security Prices](https://www.crsp.org/products/documentation/crsp-calculations)\n" provider: portfoliooptimizer method: POST path: "/assets/prices/adjusted" encoding: json input: { type: "object" required: ["assets"] properties: { assets: { type: "array" items: { type: "object" required: ["assetPrices"] properties: { assetDividends: { type: "array" description: "assetDividends[t] contains dividend information for the asset at the date t" items: { type: "object" required: ["date", "amount"] properties: { amount: { type: "number" description: "The dividend amount distributed by the asset at the date t" } date: { type: "string" description: "The date corresponding to the date t in format YYYY-MM-DD, which is usually the ex-distribution date" } } } } assetPrices: { type: "array" description: "assetPrices[t] contains price information for the asset at the date t" items: { type: "object" required: ["date", "close"] properties: { close: { type: "number" description: "The unadjusted close price of the asset at the date t" } date: { type: "string" description: "The date corresponding to the date t in format YYYY-MM-DD" } } } } assetSplits: { type: "array" description: "assetSplits[t] contains split information for the asset at the date t" items: { type: "object" required: ["date", "factor"] properties: { date: { type: "string" description: "The date corresponding to the date t in format YYYY-MM-DD, which is usually the ex-distribution date" } factor: { type: "number" description: "The split factor of the asset at the date t" } } } } } } } } } output: { type: "object" required: ["assets"] properties: { assets: { type: "array" items: { type: "object" required: ["assetAdjustedPrices"] properties: { assetAdjustedPrices: { type: "array" description: "assetAdjustedPrices[t] contains adjusted price information for the asset at the date t" items: { type: "object" required: ["date", "fullyAdjustedClose"] properties: { date: { type: "string" description: "The date corresponding to the date t in format YYYY-MM-DD" } dividendAdjustedClose: { type: "number" description: "The dividend(s) adjusted close price of the asset at the date t, only present if dividend(s) information are provided" } fullyAdjustedClose: { type: "number" description: "The dividend(s) and split(s) adjusted close price of the asset at the date t" } splitAdjustedClose: { type: "number" description: "The split(s) adjusted close price of the asset at the date t, only present if split(s) information are provided" } } } } } } } } } }