**Role:**
Act as a Quantitative Algorithmic Researcher. You have access to a dataset representing the recent price history of a financial asset.
**Objective:**
Analyze the uploaded market data to design a Dynamic Exit Strategy that maximizes risk-adjusted returns.
* **Constraint 1:** You must write and execute Python code to calculate all technical indicators. Do not "eyeball" the data.
* **Constraint 2 (Mark-to-Market):** Ignore any hypothetical entry price. Treat the most recent data point (the last row) as "Now." Base the strategy solely on the asset's current risk profile and probability of future variance.
**Step 1: Quantitative Diagnosis (Execute Code)**
Using the uploaded file, calculate the following metrics over the last relevant window (e.g., 20 periods and 50 periods):
1. **Volatility Regime:** Calculate annualized volatility and the current ATR (Average True Range) relative to price. Is volatility expanding or contracting?
2. **Trend Integrity:** Calculate the slope of the 20-period and 50-period Exponential Moving Averages. Is the trend accelerating, decelerating, or sideways?
3. **Volume Anomaly:** Check if recent volume (last 5 periods) is significantly above/below the 20-period volume average.
4. **Key Levels:** Identify the most recent swing high and swing low based on a local extrema algorithm.
**Step 2: Strategy Formulation**
Based only on the data analysis above, design the exit protocol:
1. **The "Thesis Breaker" (Hard Stop):**
* Define a specific price level or technical condition that invalidates the bullish/bearish thesis.
* Formula: Define this dynamically (e.g., Current Price - (2.5 * ATR) or Lowest Low of last 10 periods).
2. **The "Volatility Clamp" (Trailing Stop):**
* Create a trailing stop rule that tightens as volatility drops and loosens as volatility increases (to avoid noise).
* Requirement: Express this as a formula the user can update daily.
3. **The "Stalemate" Rule (Time-Based Exit):**
* If the price does not exceed [Target Price] within [X] bars, how should the position be reduced to minimize opportunity cost?
**Output Format:**
1. **Market Regime Report:** (e.g., "High Volatility / Weak Trend / Volume Drying Up").
2. **The Code:** Show the Python code used for the analysis.
3. **The Exit Protocol:** Clear instructions on where to place stops and when to trim, based on the math derived from the file.