# `DpExchange.Core.Types.FinancialStatement`
[🔗](https://github.com/DistortionPoint/dp-exchange-core/blob/v0.3.120/lib/dp_exchange/core/types/financial_statement.ex#L1)

A financial statement as the venue publishes it.

## The line items are the venue's, kept as sent

`:line_items` is a map of the venue's own field names to their values. It is deliberately
not normalised into a fixed set of fields.

Statements differ by accounting standard, by fiscal calendar, by industry and by how much
detail the venue chose to relay. A fixed schema would have to drop whatever did not fit,
and dropping a line from a balance sheet is not a lossy convenience — it is a statement
that no longer balances. **Where this interface cannot carry a venue's structure faithfully
it carries it verbatim**, rather than reshaping it into something that looks tidier and
says less.

## `:period_end` and `:fiscal_period` are both needed

A fiscal year is not a calendar year and does not end on the same date for every issuer.
`:period_end` is the date the statement covers to; `:fiscal_period` is the venue's own
label for it — `"FY2025"`, `"Q3"`. Comparing two issuers on `:period_end` alone compares
different quarters; comparing on the label alone compares different dates.

## `:currency` is not assumed

Statements are reported in the issuer's currency, which is not the venue's quote currency
and not the caller's. `nil` means the venue did not say — it does not mean USD.

# `kind`

```elixir
@type kind() :: :balance_sheet | :income | :cash_flow | :indicators | :other
```

# `t`

```elixir
@type t() :: %DpExchange.Core.Types.FinancialStatement{
  currency: String.t() | nil,
  fiscal_period: String.t() | nil,
  kind: kind(),
  line_items: %{optional(String.t()) =&gt; term()},
  period_end: Date.t() | nil,
  provider: atom(),
  symbol: String.t(),
  venue_time: DateTime.t() | nil
}
```

# `new`

```elixir
@spec new(keyword() | map()) :: t()
```

Builds a `t:t/0`, failing closed if a required field is absent or `nil`.

`@enforce_keys` guards presence, not `nil` — see `DpExchange.Core.Types.Validate`.

Also raises on a `:kind` outside `:balance_sheet | :income | :cash_flow | :indicators |
:other`, on `:line_items` that is not a plain map (an empty map is legal: the venue sent no
lines), and on a `:period_end` that is not a `Date`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
