# Portfolio & Positions

The portfolio view in PaperMarket shows how all of your simulated trades come together.\
It combines your virtual cash, your open positions in YES and NO tokens and your current profit and loss into one screen.

This page explains how to read the portfolio and how positions are built from individual trades.

### What the portfolio shows

The portfolio view focuses on three things

* your current virtual cash balance
* your open positions in each token you have traded
* derived metrics such as current value and unrealized PnL

Closed trades are not lost.\
They are reflected in your cash balance and in the PnL numbers even when there is no open position left in a given market.

### Positions per token

For every YES or NO token that you have traded PaperMarket keeps a position record.

For each token the position includes

* net size after all buys and sells
* average entry price based on executed trades
* current value estimated from the latest mid price
* unrealized PnL for the remaining size

If the net size is greater than zero you hold a long position in that token.\
If the net size is zero you are flat and there is no active exposure in that market.

The app does not create short positions.\
Sell trades can only reduce or close an existing long position and will never push the net size below zero.

### How positions are built

Positions are built entirely from trades.

When an order is executed the backend creates one or more trade records.\
Each trade has a price and a size.

For a given token the backend

* adds the size of buy trades and subtracts the size of sell trades to compute the net position
* recalculates the average entry price from all trades that contributed to the current size
* updates the realized effect of fully closed positions in the cash balance

You do not edit positions yourself.\
They always reflect the exact sequence of trades that you have made in the simulation.

### Valuing positions with live prices

To show the current value of a position PaperMarket uses live prices from Polymarket.

For each token the app

* fetches the latest order book
* derives a mid price from the best bid and best ask
* multiplies the mid price by the net position size to get a current value

Unrealized PnL for a position is the difference between

* what you effectively paid for the current size based on the average entry price
* and what the same size would be worth at the latest mid price

Because prices come from live order books this value will move whenever the underlying Polymarket market moves.

### Reading the portfolio during a session

While you trade you can use the portfolio view to answer simple questions

* Which markets am I currently exposed to
* How large is my position in each YES and NO token
* At what average price did I enter
* How much would I gain or lose if the market settled at the current mid price

If you top up your virtual balance the cash line jumps back to the starting amount but positions and PnL calculations continue to reflect the real sequence of trades that led to the current state.

### Using positions for practice

PaperMarket is built for practice not for perfect accounting.

The portfolio and positions view give you a way to see

* how quickly risk can build up when you add to a position
* how sensitive your PnL is to small changes in price
* how different sizing rules affect your results over a series of trades

By reviewing positions after a session you can compare what you planned to do with what the portfolio actually shows and adjust your approach before you take similar trades on real Polymarket markets.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://papermarket.gitbook.io/papermarket/portfolio-and-account/portfolio-and-positions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
