Home/Learn/What Is Swing Trading — Holding Periods, Instruments, and Technical vs Fundamental Analysis for Indian Markets
swing tradingSwing TradingBeginner

What Is Swing Trading — Holding Periods, Instruments, and Technical vs Fundamental Analysis for Indian Markets

1 min read45 sections · 0 words

Key Takeaways

Swing trading is a trading technique based on technical analysis — and in many cases a combination of technical and fundamental analysis — where a trader seeks to profit from short-to-medium term price swings. Unlike intraday trading, where positions are opened and closed within the same session, swing traders hold their positions for a minimum of 3 days and typically for up to 3 months. Positions held beyond 3 months in equity (cash) can still be considered short-term trading or positional trading, while positions in futures are naturally capped at approximately 3 months by the maximum contract expiry available on NSE.The choice of instrument — cash equity, futures, or options — fundamentally determines how you approach swing trading. Cash equity (buying and holding stocks) allows indefinite holding, is suitable for longer-term swings targeting 30–100% gains, and does not carry the margin and expiry pressure of derivatives. Futures are cost-effective for medium-term swings of 1–3 months targeting 5–15% moves, and leverage amplifies gains. Options buying for swing trading is not recommended for most traders because overnight gaps and rapid premium decay (theta) can produce large losses even when the direction is correct.The analysis framework for swing trading adapts to the holding period and instrument. For futures swing trades targeting 5–15% moves over 1–3 months, technical analysis alone — chart patterns, support and resistance zones, moving averages, momentum — is sufficient. For cash equity swing trades targeting 30–100% gains over 6 months to 2 years, combining technical analysis with fundamental analysis (earnings growth, sector tailwinds, valuation, promoter holding) dramatically increases the probability of reaching the target without the stock reversing before it gets there.The single biggest misconception about swing trading is that it is slow or inferior to intraday. Swing trading is not slow — it is patient. A trader who captures a 50% move on a stock in 6 months has significantly outperformed the majority of intraday options traders who spent 6 months buying and selling multiple times per day with net losses or small gains. The effort required is also dramatically lower: swing trading requires 1–2 hours of analysis at entry, periodic chart reviews, and price alerts — not full-day screen time.Swing trading works best as a secondary income stream alongside a primary job, business, or other activity — not as a full-time replacement for employment income. The reason is both financial and psychological: financially, a regular income allows you to deploy capital into swing trades without depending on those trades to pay monthly bills (which creates emotional pressure to exit early or take losses badly). Psychologically, having other activities prevents the boredom and compulsive chart-checking that destroys swing trading performance.
Contents

Swing trading sits in the most productive zone of the trading spectrum — patient enough to let high-probability setups develop fully, fast enough to generate returns in weeks rather than years. Understanding exactly what it is, how long to hold, and which instrument to use for each type of swing is the foundation that everything else in swing trading is built upon.

What Is Swing Trading?

Swing trading is a trading technique generally associated with technical analysis in which the trader seeks to profit from short-term to medium-term price movements — called "swings" — in a stock, index, commodity, or any other financial instrument. The core idea is straightforward: markets do not move in straight lines. They move in waves — up, then pull back, then up again; or down, then bounce, then down again. Swing traders identify these waves and position themselves to profit from one swing at a time.

Unlike day traders who enter and exit within the same session, and unlike long-term investors who buy and hold for years regardless of short-term fluctuations, swing traders occupy the middle ground. They are willing to hold positions for several days to several months — long enough for a meaningful price move to develop, but not so long that they are committed to a multi-year timeframe. This makes swing trading accessible to people with regular jobs, since positions do not need to be monitored minute by minute.

In the Indian market context, swing trading is most commonly applied to NSE-listed stocks (cash segment) and to NSE derivatives (futures and options). The stocks in focus are typically large-cap and mid-cap companies with clear trends, visible chart patterns, and sufficient liquidity to enter and exit positions without significant slippage. Swing traders in India often use weekly and monthly charts for trend identification and daily charts for entry and exit timing.

Swing trading can be purely technical — based entirely on chart patterns, price action, and technical indicators — or it can combine technical analysis with fundamental research. The appropriate combination depends on the holding period and the type of instrument being traded. Shorter swings in futures are handled with technical analysis alone; longer swings in cash equity for 30–100% gains benefit greatly from adding fundamental analysis to confirm that the company's business justifies the expected price appreciation.

"

Swing trading is not slow — it is patient. Patience in trading is not a weakness; it is the skill that separates traders who consistently make money from those who consistently give it back.

Swing Trading Course — Basic to Advanced

The Holding Period — 3 Days to 3 Months

The defining characteristic of a swing trade is its holding period: a minimum of 3 days and a typical maximum of 3 months. Any trade where you enter and exit within the same day is intraday trading. Any trade held for less than 3 days — even overnight — is technically a very short-term trade or position trade. When you hold for 3 days or more, with the intention of capturing a multi-day or multi-week price swing, it becomes a swing trade.

The 3-day minimum is not an arbitrary rule — it reflects the time needed for a price swing to develop on a daily chart. The most reliable swing setups (breakouts from chart patterns, reversals from key support/resistance, moving average crossovers) are identified on the daily chart and produce moves that take several days to a few weeks to reach their targets. Trying to capture these moves in 1–2 days is intraday trading in disguise — you are exposed to all the noise and volatility of the short timeframe without allowing the thesis time to play out.

The 3-month upper boundary applies primarily to futures, where the maximum contract expiry available on NSE is approximately 3 months (the current, next, and far-month expiries). If you are swing trading futures and need to hold beyond the current expiry, you must roll over to the next contract — which incurs additional transaction costs and requires a deliberate decision about whether to continue the trade. For cash equity, there is no expiry constraint — a swing trade in cash can theoretically be held for 6 months, 1 year, or 2 years if the thesis is still intact and the fundamentals support continued upside.

For cash equity with a longer holding period (6 months to 2 years), the trade transitions from a medium-term swing into what can be called short-term investing or positional trading. These longer-duration cash trades are the ones that produce the largest gains — 30%, 50%, 100% or more — and they require both technical timing (to enter at the right price with a defined stop) and fundamental conviction (to hold through inevitable pullbacks without exiting prematurely).

Swing Trading Holding Period Reference

── HOLDING PERIOD CLASSIFICATION ───────────────────────────────────

Intraday: Same day, exit before 3:30 PM

Very short-term: 1–2 days (overnight hold only)

SWING TRADING: 3 days → 3 months

Positional/Short: 3 months → 1 year (cash only)

Long-term invest: 1 year + (cash only)

── FUTURES LIMIT ────────────────────────────────────────────────────

Max expiry available: ~3 months (current + next + far month)

Rollover is possible but adds costs — plan the holding period upfront

── CASH EQUITY — NO EXPIRY ──────────────────────────────────────────

Cash positions can be held indefinitely

Best for 30–100%+ swing targets over 6 months – 2 years

Requires fundamental conviction to hold through pullbacks

Swing Trading in Cash vs Futures vs Options

The choice of instrument — cash equity, futures, or options — is one of the most consequential decisions in swing trading, because each instrument has fundamentally different cost structures, risk profiles, and suitability for different holding periods.

Cash equity is the simplest and most suitable instrument for longer swing trades (1 month to 2 years). You buy the actual shares at the current market price, and you own them until you sell. There is no expiry date, no margin call risk (assuming you are not using leverage), and no premium decay. The downside of cash is that it requires full capital upfront — you cannot amplify your position with leverage (without borrowing). For swing traders with smaller capital, this limits the number of positions you can hold simultaneously. The appropriate return target for cash swings is 30–100%, achieved over 6 months to 2 years, which makes cash equity the vehicle for the biggest absolute gains in swing trading.

Futures are suitable for shorter swing trades (1 week to 3 months) where you have a high-conviction directional view and want leverage to amplify a 5–15% move in the underlying. Futures require margin (a percentage of the contract value) rather than the full amount, which means you can control a larger position with a smaller capital outlay. The risk: if the stock moves against you significantly, you face mark-to-market losses that can exceed your initial margin, requiring additional capital (margin call). Futures also carry basis risk (the price difference between the futures contract and the spot price) and must be rolled over or squared off at expiry. For swing trades in futures, technical analysis alone is sufficient — the typical holding period is too short for fundamental changes to materialize.

Options are not recommended for swing trading for most traders — including experienced ones — for two critical reasons. First, options premium decays over time due to theta (time decay). Even if the stock moves in your direction, the premium you paid for the option may decline or stay flat if the move is slow, because time decay erodes the option's value every day. A swing trade that takes 3 weeks to reach its target in cash or futures may result in a loss in options if the move was gradual and theta ate into the premium. Second, overnight gaps are particularly dangerous in options: a sudden overnight news event can gap the stock significantly against your position, producing a loss in the option premium that is disproportionately large relative to the move in the underlying.

Instrument Comparison for Swing Trading

📈

Cash Equity

Best for: 6 months – 2 years. Targets: 30–100%+. No expiry, no margin call. Requires full capital.

Futures

Best for: 1 week – 3 months. Targets: 5–15%. Leveraged, expiry risk, rollover cost. Technical only.

Options

NOT recommended for swing trading. Theta decay erodes premium. Overnight gap risk is amplified.

⚖️

80/20 Split

Recommended allocation: 80% capital in cash equity swings, 20% in futures swings. 0% in options.

Technical Analysis for Swing Trading

Technical analysis is the primary tool for swing trading — identifying the right time to enter a position, where to place the stop loss, and where to set the profit target. Unlike fundamental analysis (which tells you whether a company is a good business), technical analysis tells you what the market is currently doing with the stock's price and when the current setup offers a favorable risk-to-reward for entry.

The key technical tools for swing trading include: chart patterns (bullish pennants, cup and handle, double bottoms, bearish pennants — the four most reliable patterns for swing trades), moving averages (particularly the 200-day moving average as a trend filter and the 50-day moving average as a dynamic support/resistance level), Fibonacci retracement levels (for identifying pullback entry zones within an ongoing trend), and support and resistance zones derived from prior swing highs and lows.

For futures swing trading, technical analysis is sufficient on its own. The holding period (1 week to 3 months) is too short for significant fundamental changes to materialize in the company. What matters is the price structure: is the stock in an uptrend? Is there a clean pullback to a support level? Is the risk-to-reward ratio favorable? These are purely technical questions that can be answered from the price chart alone.

Technical analysis also provides the entry timing precision that fundamental analysis cannot. A company may have excellent fundamentals — growing revenues, expanding margins, strong balance sheet — but if the stock is overextended above its moving averages after a sharp rally, entering now produces a poor risk-to-reward ratio. Technical analysis helps you wait for the stock to pull back to a better entry level — where the stop loss is tighter and the upside to the target is larger — rather than entering just because the fundamentals are good.

Fundamental Analysis — When and Why to Add It

Fundamental analysis — the study of a company's financial health, business model, earnings growth, and sector position — becomes increasingly important as the holding period extends beyond 3 months. For a 1-week futures swing, fundamentals are largely irrelevant. For a 12-month cash equity position targeting 50–100% gains, fundamentals are essential.

The reason fundamentals matter for longer swings is conviction. When you hold a position for 6 months, the stock will inevitably have periods where it pulls back 10–15% from your entry price. If your only reason for holding is that the chart looked bullish, a 15% pullback will shake your conviction and you will sell — only for the stock to recover and continue to your original target. If your reason for holding includes a fundamental thesis — the company is growing earnings at 25% annually, expanding into new markets, and trading at a discount to its intrinsic value — the pullback is easier to hold through because you know the business case has not changed.

The key fundamental factors for swing stock selection include: earnings growth consistency (is the company growing revenue and profit year over year?), sector tailwinds (is the entire sector expanding, or is this company fighting a declining market?), debt levels (companies with manageable debt survive economic slowdowns better than heavily leveraged ones), promoter holding and institutional activity (high promoter holding and increasing FII/DII buying are positive signals), and valuation relative to peers (is the stock reasonably valued relative to its growth rate and sector comparables?).

The combination approach — identifying stocks that are fundamentally strong AND technically ready for entry — produces the highest-conviction swing trades. The fundamental analysis filters out weak companies from the opportunity list; the technical analysis identifies the precise entry timing within the confirmed opportunities. A technically strong setup in a fundamentally weak company is a lower-probability trade; a fundamentally strong company at a technically well-defined entry zone is among the highest-probability setups available in swing trading.

Technical + Fundamental: The 100% Return Framework

The most powerful application of swing trading in cash equity is the combination of fundamental and technical analysis to identify stocks capable of doubling (100% gain) within 6 months to 2 years. This is not a routine outcome — it requires significant selectivity and patience — but it is achievable for traders who apply both frameworks rigorously.

The framework works as follows: on the fundamental side, identify companies that are in a growth phase — accelerating earnings, expanding margins, entering new markets, or benefiting from a structural sectoral tailwind. These companies have the business momentum to grow their stock prices significantly over 12–24 months, because the stock price eventually follows earnings. The fundamental screen produces a shortlist of companies worth owning.

On the technical side, wait for a clearly defined entry opportunity on the daily or weekly chart: a breakout from a multi-month consolidation, a pullback to a long-term moving average with a bullish reversal candle, or a classic chart pattern (cup and handle, double bottom) near a major support zone. The technical setup provides the entry price, the stop loss (below the pattern low or the consolidation range), and the initial target (the measured move from the pattern).

When both frameworks align — a fundamentally strong company at a technically well-defined entry zone — the conviction to hold through inevitable 10–20% pullbacks is much stronger. The stock may take 6–12 months to reach the 100% gain target, but the combination of business momentum (driving the price higher over time) and technical discipline (entering at the right level with a defined stop) makes the large gain achievable without requiring perfect timing.

💎

The 100% Swing in Cash — Patience Over 6–24 Months with Both Fundamental and Technical Conviction

The 100% return swing strategy in cash equity is a marathon, not a sprint. These positions require 6 months to 2 years to develop fully. If you are unwilling to hold a position through a 15% pullback when the fundamental thesis is intact, this strategy will not work for you — you will exit on every pullback and miss the eventual large gain. The combination of fundamental conviction and technical entry discipline is what allows you to hold through the uncomfortable periods.

Swing Trading vs Intraday Trading

The most common comparison beginners make is between swing trading and intraday trading — particularly intraday options buying, which is heavily promoted on social media. Understanding the actual differences (not the perception) is critical before choosing your trading style.

Intraday trading requires you to be present at the screen throughout the trading session (9:15 AM to 3:30 PM). Every position must be closed by end of day, which means your profit or loss is realized daily. The psychological pressure is continuous: every candle that moves against your position demands a decision — hold or exit. The transaction costs (brokerage, STT, exchange charges) are incurred on every trade, and with multiple trades per day, these costs compound into a significant drag on performance. For intraday options buying specifically, the average participant's net returns after costs are negative — the few spectacular winners on social media represent a tiny fraction of all intraday options participants.

Swing trading requires you to be present for 1–2 hours of analysis at entry, and then periodic chart reviews (once or twice daily) for the duration of the trade. Positions are held for days to months, so transaction costs per trade are incurred much less frequently — dramatically reducing the cost drag on returns. The psychological pressure is different: rather than watching every minute candle, you experience the pressure of holding through multi-day adverse moves, which requires a different kind of discipline — patience rather than quick reaction.

Swing trading is not better or worse than intraday trading — they are different skills for different personality types. Traders who find it unbearable to watch a position overnight (the fear of a gap-open moving against them) are better suited to intraday. Traders who find the constant screen-watching of intraday exhausting and prefer to make fewer, higher-conviction decisions are better suited to swing trading. Many experienced traders do both — intraday on certain sessions and swing trades running in the background — using each style to complement the other.

Swing Trading vs Long-Term Investing

At the other end of the spectrum from intraday trading is long-term investing — buying fundamentally strong companies and holding them for 5, 10, or 20 years regardless of short-term price fluctuations. Swing trading occupies the middle ground between these two extremes.

The key difference between swing trading and long-term investing is the use of technical analysis for timing entries and exits. A long-term investor in a fundamentally excellent company may buy at any price and accept whatever the market gives over 10 years — entry timing matters little when the holding period is a decade. A swing trader in the same company is disciplined about entry: they wait for a technically sound setup (a pullback to a key support, a pattern breakout) to buy, and they have a defined stop loss below which they will exit and wait for a better opportunity.

This timing discipline is what allows swing traders to achieve better risk-adjusted returns than passive buy-and-hold in many cases. By entering at technically favorable levels (higher probability of near-term upside) and exiting when the technical structure breaks down (even if the fundamental thesis is still intact), swing traders avoid holding through large drawdowns that long-term investors must absorb.

Mutual funds are often cited as a benchmark: the average annual return from equity mutual funds in India over the long term is approximately 12–15%. A swing trader targeting 30% annual returns from a combination of cash equity swings and futures trades is aiming to double or triple the mutual fund return — with active management and risk. Whether this active management premium is worth the time and effort is a personal decision, but 30% per year in swing trading is achievable and has been demonstrated by disciplined practitioners — it is not an unrealistic goal for someone who learns the craft properly.

Swing Trading as a Second Income Source

One of the most important pieces of guidance for anyone beginning swing trading is this: do not quit your job or primary business to do swing trading full-time, at least not in the early years. Swing trading works best as a secondary income stream — a way to generate returns on savings that would otherwise sit in a bank account earning 4–6% annually.

The reason for this recommendation is both financial and psychological. Financially: if you depend on swing trading profits to pay your monthly expenses (rent, groceries, EMIs), the emotional pressure to make money every month will cause you to take trades that should not be taken, exit winners too early, and hold losers too long — exactly the behaviors that destroy trading performance. With a primary income covering expenses, the swing capital is "investable surplus" — money you can afford to hold through a 15% drawdown without losing sleep.

Psychologically: swing trading is genuinely boring when done correctly. You place a trade, set your alerts, and then wait — for days, weeks, or months. Without a job, business, hobby, or other meaningful activity, this waiting becomes unbearable, and traders fill the time by over-analyzing their positions, trading more frequently than the setup quality justifies, or shifting capital between trades based on which one is moving fastest at the moment (a guaranteed way to hurt performance).

The ideal swing trading lifecycle looks like this: start with whatever savings you have (Rs. 50,000 to Rs. 2,00,000), generate consistent returns using the swing framework, and reinvest those returns while continuing to deploy capital from your primary income. Over 3–5 years, the capital base grows substantially — from Rs. 1 lakh to Rs. 10 lakhs to Rs. 50 lakhs. At Rs. 50 lakhs, a 30% annual return produces Rs. 15 lakhs per year — at which point the swing income genuinely supplements or eventually replaces the primary income. This is the compounding journey: slow at first, dramatically accelerating as capital grows.

Realistic Returns — What to Expect

One of the most damaging influences on new swing traders is social media — specifically, the constant stream of screenshot-based claims of extraordinary returns that make 50–100% monthly gains appear normal. They are not normal. They are either extreme outliers, partially fabricated, or products of luck that will not sustain over time.

Realistic swing trading returns for a disciplined, well-trained swing trader in Indian markets are: 25–40% per year consistently over multiple years. This translates to approximately 2–3% per month on average — not every month will be positive, but the annual average should be in this range. Occasional years will produce higher returns (40–60%) during strong bull markets; occasional years will produce flat or negative returns during bear markets. Over a 5-year period, a 30% annual return compounds Rs. 1 lakh into approximately Rs. 3.7 lakhs — and Rs. 10 lakhs into Rs. 37 lakhs.

For comparison: the Nifty 50 index has averaged approximately 12–15% per year over the long term. A mutual fund investing in Indian equities averages 15% annually when compounded over 10 years. A swing trader targeting 30% annually is attempting to generate 2× the mutual fund return — which is meaningful and achievable but requires real skill, discipline, and ongoing learning. Expecting 100% per month is not swing trading — it is gambling with false expectations.

The most important mental shift for new swing traders is to judge success by consistency and process, not by the absolute size of monthly returns. A month where you followed all your rules, took only high-quality setups, managed stops correctly, and ended flat is a success — you preserved capital and did not create losses. A month where you made 20% by breaking your rules and getting lucky is a failure in disguise — the same approach will produce large losses in the future. Consistency of process produces consistency of results; chasing large returns produces large losses.

Swing Trading Return Expectations — Reality Check

Annual return: 25–40% — realistic, consistent, achievable with discipline85%
Annual return: 15% — conservative, still 2× mutual funds, excellent for capital preservation70%
Annual return: 50–80% — possible in bull years, not sustainable as a consistent expectation45%
Monthly return: 50–100% — social media fantasy. Not a realistic or sustainable swing trading target.10%

Common Misconceptions About Swing Trading

Misconception 1 — Swing trading is passive: swing trading requires active analysis at entry (identifying the setup, calculating entry/stop/target), ongoing monitoring during the trade (daily chart review, alert management), and disciplined exit execution. It is less intensive than intraday, but it is not passive. The analysis phase requires skill and knowledge; the monitoring phase requires discipline; the exit phase requires emotional control.

Misconception 2 — Options are better than swing for quick profits: the comparison is false because they are different instruments with different purposes. Options buying is an intraday/short-term instrument (1–3 day maximum for most retail buyers). Swing trading is a multi-week to multi-month approach in cash or futures. Comparing them is like comparing a sprint to a marathon — the distance and technique are completely different. Most retail options buyers lose money over any meaningful time period; most disciplined swing traders who have learned proper frameworks generate consistent positive returns.

Misconception 3 — You need a lot of capital to swing trade: you can begin swing trading with Rs. 20,000–50,000 in cash equity. The returns on small capital are smaller in absolute rupees but the same percentage-wise. The compounding journey begins wherever you start. Do not delay starting swing trading because you feel your capital is too small — begin, learn the process, and let the capital grow through reinvested returns and ongoing contributions from income.

Misconception 4 — Swing trading replaces intraday income quickly: building swing trading to a level where it replaces meaningful intraday income takes 2–5 years of consistent application. There is no shortcut. This is the same timeline as learning any skilled profession — and the returns per hour of effort in mature swing trading are excellent, but it takes time to get there. Expecting to replace a Rs. 50,000/month job with swing trading income in 3 months is a recipe for frustration and dangerous position-sizing decisions.

Swing Trading — Core Understanding

    Swing Trading Basics FAQs

    How is swing trading taxed in India?

    In India, profits from swing trading depend on the instrument and holding period. For equity (cash stocks) held more than 1 year: Long-Term Capital Gains (LTCG) at 10% on gains above Rs. 1 lakh per year. For equity held less than 1 year: Short-Term Capital Gains (STCG) at 15%. For futures and options: profits are treated as Business Income and taxed at your applicable income tax slab rate. For most swing traders who hold cash equity for 1–12 months, STCG at 15% applies to most positions. Consult a tax professional for personalized advice, as tax laws change annually with the budget.

    How many stocks should I have in my swing portfolio at one time?

    For beginners, 2–3 simultaneous swing positions is the recommended maximum. This allows you to give proper attention to each position — reviewing the chart daily, managing the stop loss, and making informed exit decisions — without spreading your analytical bandwidth too thin. As you gain experience and the process becomes more systematic, you can expand to 5–8 positions. Professional swing traders may hold 10–15 positions simultaneously, but they have automated alerts, documented trading plans for each position, and years of experience managing multiple open trades without losing track of any of them.

    Can I swing trade with a mutual fund-like approach — buying a basket and forgetting?

    No — swing trading requires active management. Unlike a mutual fund where the fund manager makes decisions and you simply hold units, a swing trade has a defined stop loss that must be honored. If you set and forget a swing trade without monitoring it, you may hold through a stop loss being hit and a large adverse move, turning a small defined loss into a large open-ended loss. The minimum monitoring required for swing trading is a daily chart review (5–10 minutes per position per day) and price alerts set at your stop loss and target levels. This is not burdensome, but it is non-negotiable.

    Is swing trading suitable for someone who has never traded before?

    Yes — swing trading is arguably the best starting point for first-time traders. The slower pace (compared to intraday) gives beginners more time to think before acting, reducing impulsive decisions. The use of defined stop losses limits the maximum loss on any single trade. The focus on chart patterns and moving averages provides a structured, learnable framework. And the ability to review positions once per day rather than continuously means beginners can trade while also learning — without the overwhelming cognitive load of intraday trading. Start with paper trading (simulated trades without real money) for 2–3 months to build familiarity with the process before deploying real capital.

    What charting tools do I need for swing trading?

    The most widely used and recommended charting platform for swing trading in India is TradingView (tradingview.com). It provides free access to daily, weekly, and monthly charts for all NSE-listed stocks, drawing tools for marking support/resistance zones and chart patterns, alert functionality (email, push notification to mobile app) at specified price levels, and a clean, customizable interface. The free version is sufficient for most swing traders. A mobile app (TradingView is available for Android and iOS) allows you to check chart positions and receive alerts wherever you are — making it easy to monitor swings without being at a desk all day.

    Share this guide

    Up Next

    Mindset and Psychology for Swing Trading — Patience, Capital Management, and Avoiding the Quick Money Trap