Insights
Past performance (template allocation)
Historical performance chart and metrics for a hypothetical portfolio defined by asset weights.
GET
/
insights
/
past-performance
cURL
curl --request GET \
--url 'https://api.wealthyhood.com/insights/past-performance?initial=10000&equities_uk=50&equities_eu=50' \
--header 'Authorization: Bearer <token>' \
--header 'x-user-id: <x-user-id>'import requests
url = "https://{host}/insights/past-performance"
headers = {
"x-user-id": "<x-user-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-user-id': '<x-user-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{host}/insights/past-performance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/insights/past-performance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-user-id: <x-user-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/insights/past-performance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-user-id", "<x-user-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/insights/past-performance")
.header("x-user-id", "<x-user-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/insights/past-performance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-user-id"] = '<x-user-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pastPerformance": {
"1y": [
{
"date": "2024-09-15T00:00:00.000Z",
"value": 10000
},
{
"date": "2024-09-16T00:00:00.000Z",
"value": 10023
}
],
"5y": [
{
"date": "2020-09-15T00:00:00.000Z",
"value": 10000
},
{
"date": "2020-09-16T00:00:00.000Z",
"value": 10008
}
],
"10y": [
{
"date": "2015-09-15T00:00:00.000Z",
"value": 10000
},
{
"date": "2015-09-16T00:00:00.000Z",
"value": 10011
}
]
},
"metrics": {
"1y": {
"maximum_drawdown": 6.3,
"volatility": 9.8,
"annualised_return": 7.5
},
"5y": {
"maximum_drawdown": 18.2,
"volatility": 12.4,
"annualised_return": 8.7
},
"10y": {
"maximum_drawdown": 28.5,
"volatility": 15.1,
"annualised_return": 10.2
}
}
}{
"status": 123,
"error": {
"message": "<string>",
"description": "<string>"
},
"responseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"status": 123,
"error": {
"message": "<string>",
"description": "<string>"
},
"responseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"status": 123,
"error": {
"message": "<string>",
"description": "<string>"
},
"responseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Auth0-issued access token that includes the scopes listed for the route.
Headers
MongoDB identifier of the user (B2B acting investor).
Pattern:
^[a-f0-9]{24}$Query Parameters
Initial portfolio value (whole currency units) used for the simulation.
Example:
"10000"
Response
Past performance series and metrics.
Map of performance tenor (e.g. 1m, 6m, 1y, 5y, 10y) to arrays of portfolio value
points over time. Tenor keys come from the statistics service; a response includes multiple
tenors in practice. See the 200 example for the exact shape.
Show child attributes
Show child attributes
Metrics keyed by tenor (e.g. maximum_drawdown, volatility, annualised_return).
Previous
Future performance (template allocation)Expected future projection for a hypothetical portfolio defined by asset weights.
Next
⌘I
cURL
curl --request GET \
--url 'https://api.wealthyhood.com/insights/past-performance?initial=10000&equities_uk=50&equities_eu=50' \
--header 'Authorization: Bearer <token>' \
--header 'x-user-id: <x-user-id>'import requests
url = "https://{host}/insights/past-performance"
headers = {
"x-user-id": "<x-user-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-user-id': '<x-user-id>', Authorization: 'Bearer <token>'}
};
fetch('https://{host}/insights/past-performance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/insights/past-performance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-user-id: <x-user-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/insights/past-performance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-user-id", "<x-user-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/insights/past-performance")
.header("x-user-id", "<x-user-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/insights/past-performance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-user-id"] = '<x-user-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"pastPerformance": {
"1y": [
{
"date": "2024-09-15T00:00:00.000Z",
"value": 10000
},
{
"date": "2024-09-16T00:00:00.000Z",
"value": 10023
}
],
"5y": [
{
"date": "2020-09-15T00:00:00.000Z",
"value": 10000
},
{
"date": "2020-09-16T00:00:00.000Z",
"value": 10008
}
],
"10y": [
{
"date": "2015-09-15T00:00:00.000Z",
"value": 10000
},
{
"date": "2015-09-16T00:00:00.000Z",
"value": 10011
}
]
},
"metrics": {
"1y": {
"maximum_drawdown": 6.3,
"volatility": 9.8,
"annualised_return": 7.5
},
"5y": {
"maximum_drawdown": 18.2,
"volatility": 12.4,
"annualised_return": 8.7
},
"10y": {
"maximum_drawdown": 28.5,
"volatility": 15.1,
"annualised_return": 10.2
}
}
}{
"status": 123,
"error": {
"message": "<string>",
"description": "<string>"
},
"responseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"status": 123,
"error": {
"message": "<string>",
"description": "<string>"
},
"responseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"status": 123,
"error": {
"message": "<string>",
"description": "<string>"
},
"responseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}