Skip to content
All library documents

A-Share Screening with RSI, Daily Gains, and Bid-Side Volume

Article NautilusTrader

Summary

This note outlines a mainland China stock screen requiring RSI below 65, a daily gain above 1%, a main-board listing, and first-level bid volume greater than ask volume. Its stated aim is to combine a technical condition and positive price movement with an order-book activity filter. Formula and Python examples illustrate candidate selection, with the Python example also excluding special-treatment and paused stocks.

The document gives no historical test, performance measurements, or evidence that the rules lead to stable returns. It cautions that the approach emphasizes technical behavior and activity while omitting company fundamentals, and that volatile markets may weaken its usefulness. The bid-versus-ask quantity comparison is presented as a liquidity or activity proxy, but the note does not explain how quote timing, displayed depth, or changing order-book conditions are handled. Suggested improvements include adding valuation, dividend, growth, and industry information, alongside risk controls and diversification.

Key ideas

  • The screen requires RSI below 65 and a daily return above 1%.
  • It restricts candidates to main-board stocks and compares best bid volume with best ask volume.
  • The example code also filters out special-treatment and paused shares.
  • The document provides screening examples but no backtest or performance evidence.
  • It recommends fundamental and industry filters alongside diversification and risk controls.

Tags

Full text
# Crypto Option


# Crypto Option

`CryptoOption` represents a put or call option on a crypto underlying. It defines the
option kind, strike price, activation time, expiration time, quote currency, settlement
currency, and contract sizing.

Examples include BTC and ETH options on crypto derivatives venues.

## Fields

| Field                 | Rust type          | Python type        | Required/default | Notes                                    |
| --------------------- | ------------------ | ------------------ | ---------------- | ---------------------------------------- |
| `instrument_id`       | `InstrumentId`     | `InstrumentId`     | Required         | Stored as `id` in Rust.                  |
| `raw_symbol`          | `Symbol`           | `Symbol`           | Required         | Native venue symbol.                     |
| `underlying`          | `Currency`         | `Currency`         | Required         | Crypto asset the option tracks.          |
| `quote_currency`      | `Currency`         | `Currency`         | Required         | Currency used to quote the premium.      |
| `settlement_currency` | `Currency`         | `Currency`         | Required         | Currency used to settle PnL and fees.    |
| `is_inverse`          | `bool`             | `bool`             | Required         | True when sizing/costing is inverse.     |
| `option_kind`         | `OptionKind`       | `OptionKind`       | Required         | Put or call.                             |
| `strike_price`        | `Price`            | `Price`            | Required         | Option strike price.                     |
| `activation_ns`       | `UnixNanos`        | `int`              | Required         | Contract activation timestamp.           |
| `expiration_ns`       | `UnixNanos`        | `int`              | Required         | Contract expiration timestamp.           |
| `price_precision`     | `u8`               | `int`              | Required         | Decimal places allowed for prices.       |
| `size_precision`      | `u8`               | `int`              | Required         | Decimal places allowed for order sizes.  |
| `price_increment`     | `Price`            | `Price`            | Required         | Smallest valid price step.               |
| `size_increment`      | `Quantity`         | `Quantity`         | Required         | Smallest valid size step.                |
| `multiplier`          | `Quantity`         | `Quantity`         | `1`              | Contract multiplier.                     |
| `lot_size`            | `Quantity`         | `Quantity`         | `1`              | Rounded lot or board size.               |
| `max_quantity`        | `Option<Quantity>` | `Quantity \| None` | `None`           | Maximum order quantity.                  |
| `min_quantity`        | `Option<Quantity>` | `Quantity \| None` | `None`           | Minimum order quantity.                  |
| `max_notional`        | `Option<Money>`    | `Money \| None`    | `None`           | Maximum order notional value.            |
| `min_notional`        | `Option<Money>`    | `Money \| None`    | `None`           | Minimum order notional value.            |
| `max_price`           | `Option<Price>`    | `Price \| None`    | `None`           | Maximum valid quote or order price.      |
| `min_price`           | `Option<Price>`    | `Price \| None`    | `None`           | Minimum valid quote or order price.      |
| `margin_init`         | `Option<Decimal>`  | `Decimal \| None`  | `0`              | Initial margin rate.                     |
| `margin_maint`        | `Option<Decimal>`  | `Decimal \| None`  | `0`              | Maintenance margin rate.                 |
| `tick_scheme`         | `Option<Ustr>`     | `str \| None`      | `None`           | Registered variable tick scheme name.    |
| `info`                | `Option<Params>`   | `dict \| None`     | `None`           | Adapter metadata.                        |
| `ts_event`            | `UnixNanos`        | `int`              | Required         | Event timestamp in nanoseconds.          |
| `ts_init`             | `UnixNanos`        | `int`              | Required         | Initialization timestamp in nanoseconds. |

*Note: Python constructors use `instrument_id`; Rust stores the same value as `id`.*

## Behavior

- `CryptoOption` has asset class `Cryptocurrency` and instrument class `Option`.
- The option kind and strike price define the payoff shape.
- The contract can be linear, inverse, or quanto, depending on the currency set.
- Use `OptionContract` for non-crypto listed options.

## Example

```rust tab="Rust"
use jiff::Timestamp;
use nautilus_core::UnixNanos;
use nautilus_model::{
    enums::OptionKind,
    identifiers::{InstrumentId, Symbol},
    instruments::CryptoOption,
    types::{Currency, Money, Price, Quantity},
};
use rust_decimal_macros::dec;

let activation: Timestamp = "2022-12-22T00:00:00Z".parse().unwrap();
let expiration: Timestamp = "2023-01-13T08:00:00Z".parse().unwrap();

let btc_option = CryptoOption::builder()
    .instrument_id(InstrumentId::from("BTC-13JAN23-16000-P.DERIBIT"))
    .raw_symbol(Symbol::from("BTC-13JAN23-16000-P"))
    .underlying(Currency::from("BTC"))
    .quote_currency(Currency::from("USD"))
    .settlement_currency(Currency::from("BTC"))
    .is_inverse(false)
    .option_kind(OptionKind::Put)
    .strike_price(Price::from("16000.00"))
    .activation_ns(UnixNanos::from(activation))
    .expiration_ns(UnixNanos::from(expiration))
    .price_precision(2)
    .size_precision(1)
    .price_increment(Price::from("0.01"))
    .size_increment(Quantity::from("0.1"))
    .multiplier(Quantity::from("1"))
    .lot_size(Quantity::from("1"))
    .max_quantity(Quantity::from("9000"))
    .min_quantity(Quantity::from("0.1"))
    .min_notional(Money::from("10.00 USD"))
    .margin_init(dec!(0))
    .margin_maint(dec!(0))
    .ts_event(UnixNanos::default())
    .ts_init(UnixNanos::default())
    .build()
    .unwrap();
```

```python tab="Python"
from decimal import Decimal

import pandas as pd

from nautilus_trader.model import CryptoOption
from nautilus_trader.model import Currency
from nautilus_trader.model import InstrumentId
from nautilus_trader.model import Money
from nautilus_trader.model import OptionKind
from nautilus_trader.model import Price
from nautilus_trader.model import Quantity
from nautilus_trader.model import Symbol

BTC = Currency.from_str("BTC")
USD = Currency.from_str("USD")

btc_option = CryptoOption(
    instrument_id=InstrumentId.from_str("BTC-13JAN23-16000-P.DERIBIT"),
    raw_symbol=Symbol("BTC-13JAN23-16000-P"),
    underlying=BTC,
    quote_currency=USD,
    settlement_currency=BTC,
    is_inverse=False,
    option_kind=OptionKind.PUT,
    strike_price=Price.from_str("16000.00"),
    activation_ns=pd.Timestamp("2022-12-22", tz="UTC").value,
    expiration_ns=pd.Timestamp("2023-01-13T08:00:00", tz="UTC").value,
    price_precision=2,
    size_precision=1,
    price_increment=Price.from_str("0.01"),
    size_increment=Quantity.from_str("0.1"),
    max_quantity=Quantity.from_str("9000"),
    min_quantity=Quantity.from_str("0.1"),
    min_notional=Money(10.00, USD),
    margin_init=Decimal(0),
    margin_maint=Decimal(0),
    ts_event=0,
    ts_init=0,
)
```

## Adapters

Representative adapters that create or consume `CryptoOption` instruments include:

- [Bybit](../../integrations/bybit.md) for crypto options.
- [Deribit](../../integrations/deribit.md) for crypto options.
- [OKX](../../integrations/okx.md) for crypto options.
- [Tardis](../../integrations/tardis.md) for crypto option metadata.

## Related guides

- [Options](../options.md) covers option data, Greeks, and chain subscriptions.
- [Crypto Option Spread](crypto_option_spread.md) covers exchange-defined crypto option spreads.

Shown in full with attribution under the source's licence. Licence: LGPL-3.0

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.