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

# Stock Market & Investments

> Run a simulated stock market so students can learn real-world investing concepts

## Overview

The ClassCents Investment Market lets students take a portion of their classroom currency and invest it in a simulated stock market. Students buy and sell shares, track their portfolio performance, and experience real-world concepts like market volatility, diversification, and profit and loss — all in a safe, consequence-free environment.

<img src="https://mintcdn.com/joshuamakes/G5j-M0tSaQs4mL9T/images/advanced/investments-page.png?fit=max&auto=format&n=G5j-M0tSaQs4mL9T&q=85&s=31e513f7063642e877e4328215141792" alt="Teacher investments page showing market controls and company list" width="1600" height="1000" data-path="images/advanced/investments-page.png" />

<Info>
  The investment market is completely separate from a student's main classroom balance. Students choose how much to transfer in, so there's no risk of accidental overspending.
</Info>

## How the Market Works

All classrooms share **one set of asset prices**. When SNKCO is trading at $8.93, it's $8.93 in every classroom. This means:

* Teachers manage one company catalog that applies everywhere
* News events fire across all your classrooms simultaneously
* Each classroom has its own **session** — when you open a classroom's market, the % change resets to 0% from that moment. Prices don't reset; only the reference point does
* Prices only drift while the market is **Open**. Closing the market freezes prices exactly where they are

## Enabling the Market

The investment market is disabled by default. You must enable it per classroom before students can access it.

<Steps>
  <Step title="Go to Classroom Settings">
    Click **Settings** in your teacher navigation, then select **Classroom Settings**.
  </Step>

  <Step title="Open the Investments Section">
    Click **Investments** in the left navigation panel. You'll see a card for each of your classrooms.
  </Step>

  <Step title="Enable the Market">
    Toggle **Enable** on any classroom card. Students in that classroom will see the **Investments** tab in their navigation immediately.
  </Step>

  <Step title="Open Trading">
    Go to **Investments** in your teacher sidebar to open the Market Hub. Select a classroom using the pill tabs, then click the **Market Open / Market Closed** button in the top-right corner to start trading.
  </Step>
</Steps>

<Tip>
  Use **Market Closed** during lessons to freeze prices and discuss student portfolios without trades interfering. Open the market at the start of a trading session.
</Tip>

## Granting Starting Balances

Students start with a \$0 investment balance. You need to grant them a starting amount before they can invest.

<Steps>
  <Step title="Open the Investments Dashboard">
    Click **Investments** in your teacher sidebar.
  </Step>

  <Step title="Click Grant Funds">
    Select **Grant Funds** in the left sidebar. Enter an amount, then choose:

    * **Create Accounts** — Sets up investment wallets for students who don't have one yet and seeds them with the amount
    * **Top Up All** — Adds the amount to every existing investment balance (useful for weekly investment allowances)
  </Step>

  <Step title="Grant to an Individual Student">
    In the same panel, find the student's row and click their **Grant** button to give funds to one student specifically.
  </Step>
</Steps>

<Warning>
  Students can also transfer funds from their own main classroom balance into their investment account at any time using the **Transfer In** button on their Investments page.
</Warning>

## Managing Assets

Assets are **global** — they apply across all your classrooms and share one price. Go to **Settings → Classroom Settings → Investments** to manage the company catalog.

### Per-Classroom Enable Controls

The Investments settings page shows a card for each classroom with a stats strip at the top (how many classrooms are enabled, how many are currently open). Toggle **Enable** on each card to control which classrooms have access. A direct link to the Investments Dashboard is shown at the top of the page.

### Adding an Asset

<Steps>
  <Step title="Open the Companies Tab">
    In the Investments collapsible, click **Companies**.
  </Step>

  <Step title="Click Add Asset">
    Fill in the asset details:

    * **Ticker** — Short symbol (e.g., `APPL`, `GOLD`)
    * **Name** — Full display name
    * **Sector** — Category (Technology, Energy, Consumer, etc.)
    * **Asset Type** — Stock, Commodity, or Luxury
    * **Current Price** — Starting price
    * **Base Price** — The "fair value" price used as an anchor for news events
    * **Volatility** — How much the price drifts between ticks. Low = barely moves (stable blue-chip feel). Medium = noticeable ticker movement. High = clearly volatile, bigger swings each tick.
    * **Icon** — An emoji or image URL
  </Step>

  <Step title="Save">
    The asset is added and shared across all your classrooms automatically.
  </Step>
</Steps>

### Asset Types

<CardGroup cols={3}>
  <Card title="Stocks" icon="chart-line">
    Traditional company shares. Price responds to sector-wide and company-specific news events.
  </Card>

  <Card title="Commodities" icon="wheat">
    Physical goods like gold, oil, or lumber. Often move opposite to stocks, teaching diversification.
  </Card>

  <Card title="Luxuries" icon="gem">
    High-volatility prestige assets. Bigger swings, higher risk and reward.
  </Card>
</CardGroup>

### Editing Prices

You can manually edit an asset's current price or base price at any time from the Companies tab. This is useful for correcting prices or simulating a specific market scenario.

## Resetting Prices

In the **Investments** settings section you can click **Reset All Prices to Base** from the per-classroom panel to return all assets to their base price.

<Tip>
  Reset prices at the start of a new unit or semester to give students a fresh market. This resets every asset's price globally — it applies across all classrooms.
</Tip>

## Firing News Events

News events let you trigger instant, dramatic price changes on top of the automatic drift. When you fire a news event, the system applies percentage changes to affected tickers or entire sectors — across all your currently open classrooms at the same time.

<Steps>
  <Step title="Open the Investments Dashboard">
    Click **Investments** in your teacher sidebar.
  </Step>

  <Step title="Click News Events">
    Select **News Events** in the left sidebar.
  </Step>

  <Step title="Choose a Template">
    Pre-built templates cover common scenarios — tech booms, energy crises, commodity spikes, and more.
  </Step>

  <Step title="Fire the Event">
    Click **Fire** on any template. Prices update instantly and the event appears in the student news feed.
  </Step>
</Steps>

<Tip>
  Fire news events at the start of class to create talking points. Ask students how their portfolio was affected before diving into the lesson.
</Tip>

### Creating Custom News Events

In the News Events view on the Investments Dashboard, click **+ New Event** to create a reusable custom scenario:

* Set a title and description students will see
* Add one or more price change rules targeting a specific ticker or an entire sector
* Use positive or negative percentages (e.g., `+15%` boom, `-20%` crash)

## Teacher Market Hub

The **Investments** page on your teacher dashboard gives you a real-time view of your market. Use the pill tabs at the top to switch between classrooms.

* **Class Overview** — Total market value, number of active investors, and overall class P\&L for the selected classroom. Click any company row to open a price chart.
* **News Events** — Fire templates or create custom events that instantly move prices
* **Grant Funds** — Create student investment accounts, top up balances, or grant funds to individual students
* **Student sidebar** — Lists every student with their total value and P\&L. Click a student to see their full holdings breakdown
* **Market Open / Closed toggle** — Top-right button to open or close trading for the selected classroom

The live ticker strip at the top shows all assets scrolling in real time when the market is open.

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Do investment gains affect a student's main classroom balance?">
    No. The investment account is completely separate. Gains and losses stay within the investment wallet unless a student transfers funds back (which is not currently supported — money only flows in).
  </Accordion>

  <Accordion title="Do prices change automatically?">
    Yes. When the market is **Open**, a background engine runs every minute and applies small price drifts. Prices oscillate gently around the price they had when the market was opened that session — a 20-minute session and a 1-hour session will look similar in scale. The **Volatility** setting on each asset controls amplitude: low-volatility assets (Consumer, Real Estate) barely move, while high-volatility assets (Crypto, Gems) show visible swings each tick. **Prices do not drift when the market is Closed** — closing the market freezes prices exactly where they are.
  </Accordion>

  <Accordion title="Are prices the same across all my classrooms?">
    Yes. All classrooms share one global price per asset — it's the same market. However, each classroom has its own **session**. When you open a classroom's market, the % change display resets to 0% from that moment's price. Prices themselves carry over from the previous session (they don't reset to base price on open). This means two classrooms can trade simultaneously and see the same drifting prices, while each class's % changes reflect their own session start.
  </Accordion>

  <Accordion title="Can students go into negative investment balance?">
    No. Students can only spend what's in their investment account. The system blocks purchases if they have insufficient funds.
  </Accordion>

  <Accordion title="What is 'base price' used for?">
    Base price sets the floor and ceiling for how far a stock can move. Prices can never fall below 25% of base price or rise above 300% of base price, no matter how many news events you fire. It is not shown to students.
  </Accordion>

  <Accordion title="Can I reset a student's portfolio?">
    Currently, portfolio resets require deleting the student's holdings directly in your Supabase dashboard. A teacher-facing reset tool is planned for a future update.
  </Accordion>
</AccordionGroup>
