> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ainvest.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Earnings backtesting

> Get earnings backtesting results

Earnings reports are anticipated by analysts and traders because they reveal the hard numbers on a company's wellbeing.
After the report is published, traders expect price movements. To help them make a decision, our [Aime the AI](https://www.ainvest.com/chat)
does some backtesting analysis by looking back at all previous earnings reports and tracking the stock price after each report.
With this data in hand, Aime provides some statistics on how the stock price usually performs after actual earnings beat forecasts.

For example, according to Aime's analysis on July 31 2025,
the stock price of [CMCSA (Comcast)](https://www.ainvest.com/stocks/NASDAQ-CMCSA) grows within the next 3 days in 80% of cases.
In 30 days after the earnings report, the returns tend to stay positive.

<ResponseExample>
  ```json theme={null}
  {
      "data": {
          "headline": "Backtest CMCSA Earning Beats",
          "summary": "The backtest shows CMCSA consistently
  outperforms following earnings beats, with an 80% win rate
  over three days and sustained positive
  returns up to 30 days. In contrast, the broader
  Media Industry exhibits negligible impact from earnings
  beats, suggesting company-specific factors drive
  CMCSA's success. Furthermore, Comcast's earnings
  beat positively influences the overall market
  but negatively affects the Healthcare Services
  sector due to shifting consumer spending.
  This indicates a sector-specific dynamic where
  strong telecom earnings can bolster market
  confidence yet divert attention from healthcare.
  Investors might benefit from focusing on CMCSA
  directly while monitoring sector rotations."
      },
      "status_code": 0,
      "status_msg": "success"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml reference/calendar/calendar.yaml GET /calendar/earnings/backtesting
openapi: 3.1.0
info:
  title: Get financial calendar
  description: >-
    Get financial calendar data, including earnings, corporate actions,
    dividends and other events
  version: 1.0.0
servers:
  - url: https://openapi.ainvest.com/open
    description: Production environment
security:
  - bearerAuth: []
tags:
  - name: Calendar
    description: Financial calendar events
    externalDocs:
      url: https://docs.ainvest.com/calendar
paths:
  /calendar/earnings/backtesting:
    get:
      tags:
        - Calendar
      summary: Get earnings backtesting results
      description: Get earnings backtesting results
      operationId: getEarningsBacktestingResults
      parameters:
        - name: unique_id
          in: query
          required: true
          description: >-
            The unique identifier for the earnings event from [Earnings
            API](/reference/calendar/earnings) call
          schema:
            type: string
      responses:
        '200':
          description: Successful response in standard envelope
          content:
            application/json:
              schema:
                $schema: http://json-schema.org/draft-04/schema#
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      headline:
                        type: string
                        description: A short one line with results of backtesting strategy
                      summary:
                        type: string
                        description: Summary of the backtesting results.
                  status_code:
                    type: number
                    description: Status code, `0` for success
                  status_msg:
                    type: string
                    description: Status message, `success` for success
        '400':
          description: Validation error, i.e. date is not specified or invalid format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status_code: 4012
                status_msg: Invalid param
components:
  schemas:
    Error:
      type: object
      properties:
        status_code:
          type: integer
          description: Business status code
        status_msg:
          type: string
          description: Error message
      required:
        - status_code
        - status_msg
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your key. [Get the key
        here](https://www.ainvest.com/business/developer-manage/)

````