Vertex AI
Vertex AI PaLM API :
MODEL_ID="text-bison"
PROJECT_ID=$DEVSHELL_PROJECT_ID
curl \
-X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
https://us-central1-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/us-central1/publishers/google/models/${MODEL_ID}:predict -d \
$'{
"instances": [
{ "prompt": "Provide a summary with about two sentences for the following article:
The efficient-market hypothesis (EMH) is a hypothesis in financial \
economics that states that asset prices reflect all available \
information. A direct implication is that it is impossible to \
\\"beat the market\\" consistently on a risk-adjusted basis since market \
prices should only react to new information. Because the EMH is \
formulated in terms of risk adjustment, it only makes testable \
predictions when coupled with a particular model of risk. As a \
result, research in financial economics since at least the 1990s has \
focused on market anomalies, that is, deviations from specific \
models of risk. The idea that financial market returns are difficult \
to predict goes back to Bachelier, Mandelbrot, and Samuelson, but \
is closely associated with Eugene Fama, in part due to his \
influential 1970 review of the theoretical and empirical research. \
The EMH provides the basic logic for modern risk-based theories of \
asset prices, and frameworks such as consumption-based asset pricing \
and intermediary asset pricing can be thought of as the combination \
of a model of risk with the EMH. Many decades of empirical research \
on return predictability has found mixed evidence. Research in the \
1950s and 1960s often found a lack of predictability (e.g. Ball and \
Brown 1968; Fama, Fisher, Jensen, and Roll 1969), yet the \
1980s-2000s saw an explosion of discovered return predictors (e.g. \
Rosenberg, Reid, and Lanstein 1985; Campbell and Shiller 1988; \
Jegadeesh and Titman 1993). Since the 2010s, studies have often \
found that return predictability has become more elusive, as \
predictability fails to work out-of-sample (Goyal and Welch 2008), \
or has been weakened by advances in trading technology and investor \
learning (Chordia, Subrahmanyam, and Tong 2014; McLean and Pontiff \
2016; Martineau 2021).
Summary:
"}
],
"parameters": {
"temperature": 0.2,
"maxOutputTokens": 256,
"topK": 40,
"topP": 0.95
}
}'
Réponse :
{
"predictions": [
{
"citationMetadata": {
"citations": []
},
"safetyAttributes": {
"scores": [
1,
0.1,
0.1
],
"blocked": false,
"categories": [
"Finance",
"Insult",
"Sexual"
],
"safetyRatings": [
{
"category": "Dangerous Content",
"severityScore": 0,
"probabilityScore": 0.1,
"severity": "NEGLIGIBLE"
},
{
"category": "Harassment",
"severityScore": 0.1,
"severity": "NEGLIGIBLE",
"probabilityScore": 0.1
},
{
"category": "Hate Speech",
"severity": "NEGLIGIBLE",
"probabilityScore": 0,
"severityScore": 0.1
},
{
"severity": "NEGLIGIBLE",
"severityScore": 0.1,
"probabilityScore": 0.1,
"category": "Sexually Explicit"
}
]
},
"content": " The efficient-market hypothesis (EMH) states that asset prices reflect all available information, making it impossible to consistently outperform the market on a risk-adjusted basis. While some studies have found evidence of return predictability, recent research suggests that predictability has become more elusive due to advances in trading technology and investor learning."
}
],
"metadata": {
"tokenMetadata": {
"inputTokenCount": {
"totalBillableCharacters": 1579,
"totalTokens": 500
},
"outputTokenCount": {
"totalTokens": 62,
"totalBillableCharacters": 327
}
}
}
}
Generative AI Studio