Turtle Trading 海龟交易策略

海龟交易策略(Turtle Trading Strategy)是由Richard Dennis和William Eckhardt在20世纪80年代开发的一种经典趋势跟随策略。该策略通过追踪价格的最高价和最低价来确定买入和卖出点位,并旨在捕捉长期趋势并获取利润。

海龟交易策略是如何诞生的

Richard Dennis是美国70年代著名的期货投资者,据传他在短短三年内从期货市场赚走了3.5亿美金。他曾和朋友William Eckhardt打赌,认为交易技能并不是天生的天赋,通过后天的系统培训,小白也可以变成出色的交易者。他招募24个普通人(他称之为“海龟”),并对他们进行了为期两周的培训,通过培训考核后给他们每个人都安排了一笔初始资金作为本金,金额从25万至200万美金不等。五年后,这些“海龟”的资金达到了1.75亿美金,Richard Dennis在实验结束后公布了他的培训体系,这就是著名的海龟交易策略。海龟交易策略是最早的量化交易方法之一,它的成功使得更多的交易者开始采用系统化的方法来进行交易,而不仅仅是依靠主观判断或者情绪。

交易规则

海龟交易策略非常注重严格的风险管理,这对量化交易产生了深远影响。量化交易者开始更加重视风险控制,采用止损和仓位控制等方法来规避风险。以下是海龟交易策略的详细介绍:

  1. 市场选择:海龟交易策略适用于具有足够流动性和波动性的市场,例如股票、期货或外汇市场。选择市场时,要考虑交易品种的流动性和可交易性。
  2. 入市规则:海龟交易策略使用突破系统来确定买入和卖出点位。具体来说,当价格突破最近一段时间(例如20日)的最高价时,产生买入信号;当价格突破最近一段时间的最低价时,产生卖出信号。
  3. 头寸规模:海龟交易策略采用固定风险模型来确定每个交易的头寸规模。根据风险限制,每个交易的风险限制为总资金的一定比例(例如2%)。根据当前的价格和波动性,计算每个交易的头寸规模,以确保风险控制在预设的范围内。
  4. 止损规则:海龟交易策略非常注重风险管理。在每个交易中,设定一个初始止损点位,当价格达到止损点位时,平仓并止损。初始止损点位通常设置在买入或卖出时的最后一个N日的最低价或最高价。随着价格上涨或下跌,根据市场情况调整止损点位,以保护利润和控制风险。
  5. 退出规则:海龟交易策略使用固定的盈利目标来确定退出点位。当价格达到预设的盈利目标时,平仓并获利。盈利目标可以根据市场的波动性和策略的需求来设定。
  6. 信号过滤:为了过滤掉一些无效的交易信号,可以使用其他技术指标或过滤条件来确认买入和卖出信号。常见的过滤指标包括移动平均线、相对强弱指标(RSI)等。
  7. 回测和优化:在实际应用之前,建议对历史数据进行回测和优化。通过回测,可以评估策略在历史数据上的表现,并根据实际情况进行参数的优化和调整。

需要注意的是,海龟交易策略并非完美无缺,可能会遇到市场不适应或产生较大回撤的情况。因此,风险管理和严格执行交易规则对于该策略的成功至关重要。此外,策略的具体参数和细节可能因个人而异,应根据个人的风险偏好、交易目标和市场条件进行适当的调整和优化。

用Java实现的海龟交易策略示例

import java.util.List;

public class TurtleTradingStrategy {
    public static void main(String[] args) {
        List<Double> prices = // 获取价格数据的方法,例如从API或文件中读取
        int breakoutPeriod = 20; // 突破周期

        double highestHigh = Double.MIN_VALUE;
        double lowestLow = Double.MAX_VALUE;
        boolean inMarket = false; // 是否持仓
        double entryPrice = 0.0; // 入场价格

        for (double price : prices) {
            // 更新最高价和最低价
            if (price > highestHigh) {
                highestHigh = price;
            }
            if (price < lowestLow) {
                lowestLow = price;
            }

            if (!inMarket && price > highestHigh) {
                // 产生买入信号,突破最高价,买入
                inMarket = true;
                entryPrice = price;
                // 执行买入操作
                // ...
            } else if (inMarket && price < lowestLow) {
                // 产生卖出信号,突破最低价,卖出
                inMarket = false;
                // 执行卖出操作
                // ...
            }

            // 更新突破周期内的最高价和最低价
            if (prices.indexOf(price) >= breakoutPeriod) {
                double previousPrice = prices.get(prices.indexOf(price) - breakoutPeriod);
                if (previousPrice == highestHigh) {
                    // 需要重新计算最高价
                    highestHigh = calculateHighestHigh(prices, prices.indexOf(price) - breakoutPeriod + 1, prices.indexOf(price));
                }
                if (previousPrice == lowestLow) {
                    // 需要重新计算最低价
                    lowestLow = calculateLowestLow(prices, prices.indexOf(price) - breakoutPeriod + 1, prices.indexOf(price));
                }
            }
        }
    }

    private static double calculateHighestHigh(List<Double> prices, int startIndex, int endIndex) {
        double highestHigh = Double.MIN_VALUE;
        for (int i = startIndex; i <= endIndex; i++) {
            double price = prices.get(i);
            if (price > highestHigh) {
                highestHigh = price;
            }
        }
        return highestHigh;
    }

    private static double calculateLowestLow(List<Double> prices, int startIndex, int endIndex) {
        double lowestLow = Double.MAX_VALUE;
        for (int i = startIndex; i <= endIndex; i++) {
            double price = prices.get(i);
            if (price < lowestLow) {
                lowestLow = price;
            }
        }
        return lowestLow;
    }
}

用Python实现的海龟交易策略示例

def turtle_trading_strategy(prices, breakout_period=20, risk_percentage=0.02):
    highest_high = float('-inf')
    lowest_low = float('inf')
    in_market = False
    entry_price = 0.0

    for price in prices:
        # 更新最高价和最低价
        if price > highest_high:
            highest_high = price
        if price < lowest_low:
            lowest_low = price

        if not in_market and price > highest_high:
            # 产生买入信号,突破最高价,买入
            in_market = True
            entry_price = price
            # 执行买入操作
            # ...

        elif in_market and price < lowest_low:
            # 产生卖出信号,突破最低价,卖出
            in_market = False
            # 执行卖出操作
            # ...

        # 更新突破周期内的最高价和最低价
        if prices.index(price) >= breakout_period:
            previous_prices = prices[prices.index(price) - breakout_period:prices.index(price)]
            previous_highest_high = max(previous_prices)
            previous_lowest_low = min(previous_prices)
            if previous_highest_high == highest_high:
                # 需要重新计算最高价
                highest_high = calculate_highest_high(prices, prices.index(price) - breakout_period + 1, prices.index(price))
            if previous_lowest_low == lowest_low:
                # 需要重新计算最低价
                lowest_low = calculate_lowest_low(prices, prices.index(price) - breakout_period + 1, prices.index(price))

def calculate_highest_high(prices, start_index, end_index):
    highest_high = float('-inf')
    for i in range(start_index, end_index + 1):
        price = prices[i]
        if price > highest_high:
            highest_high = price
    return highest_high

def calculate_lowest_low(prices, start_index, end_index):
    lowest_low = float('inf')
    for i in range(start_index, end_index + 1):
        price = prices[i]
        if price < lowest_low:
            lowest_low = price
    return lowest_low

所有评论(9)

  1. admin说道:

    This message is used to verify that this feed (feedId:73207022332926976) belongs to me (userId:73036540124555264). Join me in enjoying the next generation information browser https://follow.is.

  2. More details说道:

    Your approach is welcomed and unique.

  3. Collette说道:

    Your writing style is engaging; I couldn’t break going through once I started.

  4. Dominica说道:

    I’m impressed by your talent to turn ordinary topics into captivating content. Great job!

  5. But because of the Covid-19 pandemic, they stopped
    print publication in 2020 and caught with digital content material for
    obvious reasons. Magnesium may be very useful in controlling stress and
    nervousness; it helps regulate the hormones related to stress, together with cortisol.
    Cortisol commonly rises through chronic stress and can have damaging effects on the physique after some time.

    Magnesium helps counteract this by promoting rest and reducing the
    physiological effects of stress. Mag Genin™ consists of magnesium glycinate, top-of-the-line magnesium glycinate
    supplements, recognized for its excessive absorption and minimal digestive
    discomfort. Magnesium has been proven to play an necessary role in serving to
    your muscle tissue loosen up. That’s why
    inadequate magnesium consumption is thought to cause some muscle
    cramps.
    Selecting a reputable brand is necessary as a result of the FDA does not
    management dietary supplements. Seek out manufacturers with impartial third-party certifications,
    corresponding to USP or NSF. These impartial certifying companies assure that
    merchandise meet rigid standards for purity, efficiency, and security.

    In 2017 the Bob Mizer Basis (bobmizer.org) re-launched Physique Pictorial with
    quarterly issues that function both new photography in addition to photographs taken throughout that magazine’s
    golden years. Growing your intake of nutritional
    vitamins and minerals should at all times start
    with a “food-first” method. If your food plan alone doesn’t do
    the trick, though, a magnesium complement might help. You’ll also discover magnesium oxide, magnesium chloride, magnesium
    lactate and many extra at your local pharmacy
    and on-line.
    Appropriate for all adults, this complement is especially beneficial for girls seeking higher stress management, mood enhancement, and
    bone well being. It is undoubtedly top-of-the-line magnesium dietary
    supplements for women, providing a natural, efficient, and protected approach to keep optimum magnesium ranges.
    Pure Encapsulations Magnesium Glycinate helps scale back muscle pressure, promote better sleep, and
    assist bone well being.
    With just a few days left in his high school profession, Michael has neglected to come up with his senior
    science project, a procrastination that will yield him a failing
    mark, thus forcing him to repeat 12th grade. Whether you’re into bodybuilding,
    power lifting, power coaching or simply getting started, these
    exercises and tips will allow you to attain your goals.
    This form is chelated with citric acid, which improves its
    absorption. Magnesium citrate proves fairly useful in enhancing digestive health and relieving constipation. Liquid and gummy dietary
    supplements are additionally quite common due to their ease of consumption. It has a mild laxative impact that makes it good for people who wish to regulate
    bowel actions. Almost 60% of the magnesium within the body is saved in bones, indicating its essential function in maintaining bone density and skeletal well being.

    Matthew’s other passions embody studying about mindfulness, strolling via nature, touring,
    and all the time working to enhance overall. They also plan to offer extra
    relating to their subscription service and we additionally discovered
    that there are plans to continue publishing FLEX, another legendary bodybuilding magazine.
    The magnesium choices don’t end with a multitude of oral dietary supplements.
    Proponents say rubbing or spraying your skin with magnesium could be as helpful (some
    say even more beneficial) as ingesting it. “There’s no definitive scientific knowledge so far that proves any one sort of magnesium supplement is better than another,” he notes.
    This easy mango, avocado and black bean salad is a delicious way to give your magnesium ranges a wholesome increase.

    It activates enzymes that facilitate energy production and regulate neuromuscular and cardiovascular capabilities.
    Appropriate for day by day use, it’s particularly beneficial for people in search of one
    of the best magnesium for sleep and anxiety, or those looking to enhance vitality ranges and
    overall well-being. Perfect for adults aged 18 and up, this product is a safe, reliable, and effective way
    to optimize magnesium consumption. Magnesium is an essential mineral that performs an important position in quite
    a few bodily functions, including muscle and nerve operate, blood
    sugar regulation, and bone health. Regardless Of its significance, many individuals don’t get enough magnesium by
    way of their food plan, leading to deficiencies that can have an result on general well-being.

    Spinach can be a good supply of magnesium, as one cup (180 g) of cooked spinach contains around 158
    mg of spinach, or 37% of the Day By Day Worth. Our Magazine wheels are
    perpetual products that serve each enthusiast with style and experience.
    Identified as The Unique Muscle Car Wheel, the S/S line is
    our most popular custom chrome wheel design. Sign in by getting into the code we sent to , or
    clicking the magic link in the e-mail. Tissue Salts are absorbed into the body
    by way of the blood vessels within the mouth, chewing the tablets somewhat than swallowing entire is most well-liked.

    Schuessler Tissue Salts are pure, appropriate for the whole household and could also be taken alongside other
    medications and dietary supplements including minerals and nutritional vitamins.

    They are specially formulated micro-doses that are
    absorbed in the mouth quite than within the
    stomach and gastric tract. In 1972 Kennedy went into enterprise for himself, selling programs of
    instruction by mail on vitamin, bodybuilding and fitness. In 1974 he began his first magazine, MuscleMag International, with an initial print run of 110,000.

    Nevertheless, based on the publication, they’ve decided
    to deliver the journal again to shop cabinets because of in style demand and
    this should occur within the second part of 2021. Many will surely
    be happy with this news, particularly long-time
    followers of the journal. Increase Testosterone For Unlimited Outcomes How testosterone
    affects bodybuilding and overall health. 5 Foods
    To Speed Up Muscle Progress A record of muscle constructing foods
    that should work for simply about anyone.
    However, some people could need help getting enough magnesium day
    by day. Lastly, consider if you’re OK taking multiple pills per day or whether you’d choose a once day by day formulation. If you’ve been recognized with
    a magnesium deficiency, Trace Mineral Mega Magazine
    is price contemplating. Local, impartial journalism needs YOUR help to outlive and thrive.

    Swallow extended-release capsules and delayed-release/enteric coated tablets or capsules entire.
    Do not crush or chew extended-release or delayed-release/enteric
    coated capsules or tablets. Doing so can release the entire drug without delay, growing the chance of unwanted aspect effects.

    Additionally, don’t break up extended-release tablets unless they’ve
    a score line and your doctor or pharmacist tells you to do
    so.
    The style of this product can be strong, so it’s really helpful to combine the liquid
    with water, juice, or meals. Hint Minerals dietary supplements are third-party tested for purity and potency.
    This product particularly is licensed by Labdoor, an independent testing organization that confirms label
    accuracy. Furthermore, this supplement is NSF Licensed for Sport, a third-party certification that
    ensures merchandise are free from more than 200 substances banned by many
    main sports activities organizations. Nothing beats the look of a set of
    steel wheels in your restored classic, muscle automobile or scorching rod.

    Liquids, powders, or another types of this product could include sugar and/or aspartame.
    Caution is suggested when you have diabetes, alcohol dependence,
    liver disease, phenylketonuria (PKU), or some other condition that requires you to limit/avoid these substances in your diet.

    Taschen’s two-volume edition a thousand Model Directory uses prints from Mizer’s authentic 4-by-5 negatives to present these good-looking hunks in gorgeous readability.

    Just as magnesium makes fireworks mild up more brightly, it’s utilized by our our bodies to liven up
    a range of capabilities. Magnesium in your physique helps
    convert meals into vitality, regulates your nervous system and creates new proteins.
    Contemplate dosage, form, and producer status when deciding on a product.
    As at all times, consult your healthcare supplier to search out the best option for your
    specific wants. People who don’t like swallowing pills might favor powders or gummies, while others like liquids for
    faster absorption. Choosing the best supplement can improve magnesium’s
    benefits for total well-being.
    Jim and Champ hit it off directly and the photographer proceeded with the first
    of 21 separate picture classes with the boy. These images
    shortly turned him into the primary (and still
    most enduringly popular) homosexual icons of all time.
    Stryker was fresh out of highschool when he met photographer Walter Kundzicz (a.k.a.
    Champion) in the summertime of 1952. In search of latest topics for a
    growing portfolio of younger male models, Champ traveled particularly
    to a rural swimming gap to satisfy the gorgeous blonde youth.
    Upon arrival, he was greeted with the breathtaking sight of
    a completely bare 18-year-old in a tree, laughing uproariously as he urinated on a friend standing beneath.

    This mineral also helps repair muscle tissue harm,
    removes lactic acid that accumulates when heavy exercise is performed and causes
    post-workout soreness. Subsequently, athletes can contemplate magnesium supplements very useful for sustaining peak
    performance and minimizing recovery time between workouts.
    Magnesium glycinate, the principle ingredient of Nature Made Magnesium Glycinate
    is a chelated type of magnesium known for its
    distinctive absorption and minimal risk of digestive upset, making it a wonderful
    alternative for these with sensitive stomachs. Not Like different
    magnesium forms, it instantly helps the relaxation of muscular tissues,
    nerves, and the cardiovascular system without inflicting discomfort.

    These supplements ensure that your body has sufficient magnesium ranges to
    enable such vital features as vitality production, protein synthesis, nerve function, and muscle contraction. Since magnesium
    additionally significantly regulates stress hormones and blood sugar ranges, its
    supplementation can have far-reaching well being advantages.
    We chosen this as the most effective magnesium complement for
    muscle cramps as a result of it incorporates three forms of magnesium — glycinate, citrate, and malate — and is usually praised for
    its ability to cut back cramps based on anecdotal evidence.
    Doctor’s Finest is a trusted model dedicated to creating scientifically backed dietary supplements that
    prioritize purity and effectiveness.
    Walter Kundzicz was born in 1925 within the Polish district of
    Newark, New Jersey. His mother and father bought him his first
    digicam for his eighth birthday and he instantly turned obsessed
    with pictures. Before Playboy, Playgirl, videotape, and even 8mm reel-to-reels, Bob Mizer mined the
    most effective and hunkiest of American guys straight off the Greyhound bus in L.A.

    It might have been described as the attractive look book
    of American male archetypes.
    Magnesium glycinate is a form of magnesium that’s created by combining magnesium with the amino
    acid glycine, which has been shown to have a relaxing impact on the brain. Because of this, it’s thought that
    it could be helpful for sleep, though research are needed to confirm its effectiveness in people.
    Twined together with the historical past of the inventive and athletic alibis in physique culture is its
    historical past of racial representation. Kennedy is further credited with discovering and serving to launch the careers
    of quite a few fitness fashions, bodybuilders,
    actors and wrestlers, including Trish Stratus, Victoria Pratt, Torrie Wilson, Cory Everson, Roland Kickinger, Larry Vinette and
    Ronnie Coleman. At the Arnold Classic bodybuilding and health expo held on March 3, 2012, simply weeks earlier
    than his dying, Kennedy was awarded the Arnold Schwarzenegger Lifetime Achievement Award;
    the award was introduced by Schwarzenegger to Kennedy’s spouse, Tosca Reno.

    References:

    long Term use of steroids

  6. Bob说道:

    Some novices will not be able to get the dumbells all the greatest way to the floor with out
    rounding their back and that’s ok; simply squat so far as you possibly can. Full two units of repetitions for every arm, and one other set with each arms.
    In this article, we’re going to outline 10 newbie dumbbell workouts that you are
    capable of do within the confines of your home. Your subsequent steps from here
    is to get these exercises printed, get them put up on the fitness center wall and get busy.

    You can do these full-body dumbbell workouts at home, when touring or on the gym.
    Go too light land you’ll battle to challenge your larger
    muscle teams such as your quads, hamstrings and again. “A stronger core means improved posture, steadiness, coordination and stability, all of which make everyday residing and movement simpler.” With nothing but
    a couple of pairs of humble ‘bells, you can unlock an unlimited
    repertoire of workouts, focusing on any and every
    muscle group across your entire physique.
    They can enhance cardio, flexibility, stability, and overall health.

    As the name implies, this exercise is right for actually
    focusing on build up the bicep. Make positive you’ve a relaxation day between every time you do them to permit for recovery.
    They’re additionally good for bettering stability, as properly as hitting
    the trapezius muscle in your upper again.
    As a single leg exercise, they offer no hiding place
    for a weaker side, forcing it to strengthen. It’s a superb muscle builder, but
    in addition a movement improver. If you only really train with barbells or machines,
    problem your self with some new workouts and movements.

    This is a pure power endurance train right here – we’re going for
    weight over time. Make certain you select a challenging weight (you’re nicely warmed up
    by now), hold your form wonderful and drive the dumbbells for a full vary of movement.
    This is the conditioning section – the final four weeks of this system have been we red-zone every
    exercise. We keep it easy, however we work really,
    actually exhausting during these periods. It’s the cherry on the cake of a 12
    week dumbbell workout plan. The dumbbell bench press is my favourite of the normal chest
    workout routines. I prefer it as a end result of the
    free weight component forces stability on each side of the body, so
    is especially good for creating functional steadiness.
    These are performed virtually identically to the swiss ball crunch.
    Here are our suggestions for selectorised dumbbells, and you can read more about each in our round-up of the most effective dumbbells.
    For many of them, it throws them proper out of their comfort
    zone and straight again to being a beginner… which helps them in the lengthy term.
    The body is pretty adaptable, and as soon as it has
    adapted it’s tough to pressure new change.
    A dumbbell lets you tweak your positioning, method, tempo and so
    on. All Through the piece, I’ll give additional advice on how you can put them together to
    form a great workout. Unauthorized use and/or duplication of this material without categorical and
    written permission from this site’s creator and proprietor is
    strictly prohibited.
    The mendacity extension, nonetheless, places your higher arms able that maximally activates all three heads of the triceps.
    The dumbbell bicep curl is easy to perform, provides you a great pump, and can help
    build shapely, muscular arms. If you have a coaching bench, stabilize your
    physique towards it. If you don’t, you should use something stable
    in your home, like a chair or a couch. When rowing along with your right arm, place your left leg on the chair and your proper foot on the floor.

    It might help you develop a better reference to the train if you use the non-dumbbell
    holding hand to attempt to feel your obliques on the working side.
    When you’re exercising this tough you need to ensure you’re giving your physique sufficient gasoline to both complete the workout and repair itself afterwards.
    That means eating a balanced food plan, ideally of home-cooked food if possible.

    The isolation moves particularly are a good way to develop particular person muscles to benefit my wider performance.
    For example, the brawn gained from triceps extensions lays the
    foundations for a robust lockout on the top of a cut up jerk.

    You can schedule the exercises throughout the week however you like, however a typical routine runs Monday, Wednesday,
    Friday and Saturday or Sunday. The means you grip the dumbbells additionally means you might be challenging
    your forearm and grip energy.

    References:

    long term steroid therapy (Bob)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注