When the author of Market Wizards, Jack Schwager, said, “The hard work in trading comes in the preparation. The actual process of trading, however, should be effortless,” he implied one should focus on how ready one is for the live market.

And by being ready, the most important thing, perhaps, is to have a trading strategy that can withstand the vagaries of the ever-changing markets.

In this context, it is important to quantitatively assess your trading strategy to ensure that it helps you achieve your goal, eliminate emotional biases, and objectively analyze your strategy.

There are multiple metrics traders use to evaluate their trading performance. Most of these parameters are not used in isolation, but in combination.

## With little ado, let us look at the 8 key metrics you can use for trading strategy evaluation:

### 1. Wins vs. Losses

The win/loss ratio refers to the ratio of the total number of winning trades to the number of losing trades. This ratio does not factor in the size of the win or loss.

Win/Loss Ratio = Number of Wins/Number of losses

Besides this ratio, it is important to also look at the size of win/ loss and assess the ratio in various market conditions to avoid biases during bull/bear markets.

It also makes sense to look at this ratio with the win-rate, which is the number of profitable trades out of the total number of trades.

A win/loss ratio above 1.0 or a win-rate above 50% is typically preferred.

2. Profit Factor

Profit factor (PF) is the ratio of gross profit to gross loss (inclusive of commissions) for a trading period. This parameter shows the amount of profit per unit of risk.

Typically, a PF of more than 1 is preferred.

PF = Gross Profit/Gross Loss

3. Percentage Profitability

This metric denotes the probability of winning and is essentially the percentage of total trades that turned out to be profitable.

This parameter is calculated by dividing the number of profitable trades by the total number of trades for a specified period.

### B) Risk Metrics

While looking at returns is important, it is essential to consider risk in your trading performance analysis, i.e. understand the probability of your strategy losing money. Here are some metrics that can help you gauge risk.

4. Maximum Drawdown

Maximum drawdown represents the largest fall in the security price from the peak to a trough over a period. It shows the largest downside risk level or the worst-case scenario of your trading strategy.

Maximum Drawdown = (Trough value – Peak value) / Peak value

Usually, a low maximum drawdown is preferred; however, it must be noted that this metric only measures the size of the largest fall and not the frequency or period for which the strategy underperformed.

5. Annualized Volatility

Annualized Volatility refers to the standard deviation of the daily returns of your trading strategy in a year. Since volatility denotes risk levels, the higher the annualized volatility, the riskier the strategy.

### C) Risk/ Reward Metrics

Given that both reward and risk are important elements to examine trading strategy performance, risk/reward ratios can help measure the potential profit of a trade relative to the risk taken. Some important ones are mentioned below:

6. Sharpe Ratio

This ratio measures the average of excess returns to standard deviation. Excess returns refer to your trade’s return minus the risk-free return.

The higher the Sharpe ratio, the better.

Sharpe Ratio = (Portfolio Return – Risk-free Return)/ Standard Deviation

7. Sortino Ratio
The Sharpe ratio penalizes a trader even with upward volatility or upside risk. The Sortino ratio measures returns adjusted for downside risk only.

Sortino Ratio = (Portfolio Return – Risk-free Return) / Annualized Volatility of Negative Returns.

8. Calmar Ratio

Calmar ratio measures the ability of your trading strategy to bounce back from extreme lows. Since it considers maximum drawdown, which denotes the worst-case scenario, Calmar ratio can be a stringent measure of trading performance.

Calmar Ratio = Average (Portfolio Return – Risk-free Return) / Maximum Drawdown

Besides using these metrics for trading performance analysis, it would also be wise to consider factors such as the total costs of trading inclusive of broking charges and taxes, the average holding period which denotes how long your trades last, exposure of your capital to a single trade, and also the number of trades per year, which evaluates the frequency of trading.

Trading performance analysis should also involve using all these metrics in various market scenarios such as trending, volatile, sideways; so you know that your trading strategy works in multiple situations and not just in select or historical scenarios.

PHI 1 offers the bulk backtesting feature to assess your trading strategy with respect to multiple metrics such as ROI and Sharpe Ratio on really large sets of data in a snap.

Also, our grading process grades the risk/return metrics of your strategies in varied market scenarios. Our aim is to ensure that market scenarios should not decide how good your strategy is.

That said, would we ask you to use multiple tools for trading performance analysis? Hell, no!

PHI 1 can give all of this and more on a single, unified platform. Go check it out for free!

You may check out some additional metrics to assess trading strategies here

The importance of strategy evaluation cannot be stressed enough in the trading context. Trading strategy evaluation has obvious benefits such as better risk management, refining your strategy, placing live trades more confidently, and avoiding huge losses.

Given the plethora of advantages and easy-to-use tools at your disposal, it makes little sense not to test your strategy prior to actual trading.

## Let us look at some methods you can use to evaluate your trading strategy.

### 1. Choose a benchmark to assess the relative performance of your strategy

After you have devised your trading strategy, you need a benchmark to compare the relative performance of your strategy. Choose a benchmark that applies to the sector or market you are trading in. For example, if you are trading a stock like Infosys, having the Nifty IT index as a benchmark would be a wise choice.

For example, let’s say your benchmark has returned a negative 2% annualized performance and your strategy has delivered a +1% annualized return. This tells you that your strategy has outperformed the benchmark.

So, you have two strategies X and Y which may have given you the same returns over a specific period. However, strategy Y may deliver the returns with much more volatility/risk vs. strategy X. This implies that X delivers better risk-adjusted returns than strategy Y. Why would you take more risk to get the same return? Clearly, X is better.

To measure risk or volatility, you can use the standard deviation of returns.

Sharpe Ratio = (Return – Risk-free Rate)/ Standard Deviation of Returns

Remember, the higher the Sharpe ratio, the better.

However, Sharpe ratio can mislead as it does not consider the direction of volatility (upward volatility may not always be unfavorable). This is because more risky strategies will always rank lower with this ratio.

An alternative ratio in this case can be the Sortino ratio, as it only considers standard deviation of downside returns. Thus, it does not penalize upward volatility as in the Sharpe ratio.

### 3. Check Profit/ Loss performance alongside ratios

It is not always a great idea to use ratios in isolation. It always pays to use charts such as P/L in various market scenarios to assess your trading strategy.

Check how the strategy will perform or has performed not just during bull phases but also during bear markets and market crashes.

### 4. Use Maximum Drawdown

Maximum Drawdown is the distance between the largest peak to the lowest valley of your P/L. Maximum drawdown measures the biggest movement from a high point to a low point prior to a new peak.

Thus, it essentially measures the size of the largest loss, an indicator of downside. It focuses on capital preservation and should be as low as possible. Maximum drawdown can measure risk-adjusted returns using the Calmar Ratio.

However, it must be noted that it does not denote the frequency of loss or size of gains.

Calmar Ratio = Average Return/Max Drawdown

### 5. Assess metrics such as Win Rate, Average Size, and Average Profit/Loss – all together

Estimating other measures such as win rate, number of wins and losses, and average profit and loss over a specified period, when taken together, can reasonably show how your strategy has worked.

### 6. Backtest  and forward-test using extensive sets of data and  multiple scenarios

Finally, when you use backtesting to examine your strategy, the results depend on how reliable your data and model are. Most times, over-fitting (which refers to designing a trading system to adapt too closely to historical data) can give you false confidence that your trading strategy is robust.

Therefore, it is important to test your strategy in a wide range of market scenarios such as crash, choppy, sideways,. and to use extensive sets of data and instruments. Consider forward-testing your strategy in different simulated environments as well.

To evaluate your trading strategy well, you need backtesting and forward-testing capabilities that allow you to test with reliable and large sets of data in all market conditions.

Now, if you’re wondering where to get such strategy evaluation tools, you’re already there! PHI 1 allows bulk-back testing on vast sets of data in a matter of minutes and in different market scenarios like trending, choppy, sideways, crash.

In fact, we have a unique scenario grading process (patent pending) that assesses your strategy in multiple market scenarios – all this on one platform!

If you want to try out these features, simply visit app.phi.io and enjoy our free 14-day trial.

You can also avail a quick demo. And once you’re convinced (which we have no doubt about), check out our reasonably priced plans here.

## What is trading strategy evaluation and how it helps you avoid huge losses?

American billionaire hedge fund manager, John Paulson, once said, “No one strategy is correct all the time.”

This quote should force us to dig deeper into our trading strategies and understand that even though we think our trading strategy has worked for us in the past, you would still need to plan for every trade you place.

What does planning in trading exactly involve, anyway?

Planning a trade involves deciding the time you want to commit to trading, your trading goals, deciding how much capital you want to allocate, risk levels, and your entry & exit points.

Then, you would need to focus on technical parameters such as research on securities, markets, trading opportunities, setting risk controls, creating a strategy and evaluating the strategy.

In this article, we focus on strategy evaluation, as it is one of the most important steps in risk management that many skip prior to placing orders.

### Trading Strategy evaluation is assessing if the strategy you have chalked out would really work for you in different scenarios.

Often, you may be convinced that a strategy will work for you, and turns out it was a loss-making one.

### 1. Helps avoid the same mistakes:

You may have placed multiple trades earlier, and things just aren’t working out for you. What do you do? Use the same strategy thinking it will work this time? Stop! Go back and check your strategy.

Are there minor things you missed out on earlier? If yes, reusing the same strategy will do no good another time.

### 2. Allows assessment of strategy robustness in various scenarios:

Okay, maybe some of your trading strategies have worked for you so far. But will your strategy work if a crash like the one that happened at the start of the lockdown in 2020 strikes one more time?

Will your strategy work in case there is a black swan event? The bottom-line is even if your strategy has worked for you in the past, there are scenarios that may make your strategy useless.

Evaluating the robustness of your strategy in various scenarios can help you understand if it will serve you in extreme situations.

### 3. Helps develop confidence prior to deployment:

Before you deploy your strategy, you can use back-testing to examine how your strategy works on historical data using back-testing.

Further, you can also forward-test your strategy via simulation, which allows you to trade in a virtual environment without using actual money.

Back-testing and simulation can enhance your confidence of trading in the live market.

There are also features like bulk back-testing that some platforms like PHI 1 offer – this allows you to auto-analyze your strategy’s performance.

Your trading strategies are scored in various market scenarios such as volatility, market crash, and trending automatically.

### 4. Trading with less stress = less emotional interference:

Once you have evaluated your trading strategy, you would use a tested approach to trading after considering multiple possibilities.

This means trading with less stress and emotional impulses. If you are a trader, you know how good trading feels without the emotional bias.

PHI 1 with its bulk back-testing, scenario grading, advanced risk controls, and simulation features ensures that your trading strategy is strong enough for the live market.

Also, you don’t have to use different tools for screening, charts, strategy creation, and placing orders. You can do it all using PHI 1 alone – a single unified algo trading platform that automates your trades the way you want it to.

PHI 1 is free to use for 14 days and offers multiple paid plans with robust features for all your algo trading needs.

## Why you must paper-test your strategy?

So you have devised a unique trading strategy for yourself and are excited to try it. However, you hold back for the fear of losing your money. Well, it’s only rational to think this way.

Before you actually go live with your trading strategy, it is important to test your strategy. One way to do so is in a virtual environment through a process known as “paper trading”.

Paper trading is essentially a practice of trading in a completely virtual or simulated environment.

The term “paper trading” came into being from the time when traders would mark their strategies on paper and compare it manually with the movement in stock prices to examine their robustness.

With paper trading, you do not need to actually invest your money as the entire trading environment is simulated.

So, anything that happens within paper trading will not affect your trading account or the stock market. Paper trading simulates real-time values of the markets and allows you to test your trading strategies and test them.

Paper trading is a must, especially if you are a beginner considering that it is your hard earned money that you deploy in the markets. In fact, it is advised not just for new traders but also for experienced traders to test novel strategies and ideas.

### 1. No risk involved

When you paper-test your strategy, it essentially costs you nothing. So, if you make a terrible trade, you cannot lose money. You can use the trade to identify flaws in your strategy and ensure that you do not repeat them during live trading, which further reduces your risk.

This can help you gain valuable initial experience as a beginner, and your hard-earned money stays with you while you practice your strategies.

### 2. No stress or emotions involved

Emotions are a large part of trading, especially for beginners. A lot of times, it is your impulses that cause a poor trade and not your strategy. Paper-testing your strategy does not allow your emotions like greed, fear, and panic take over. This allows you to stick to your strategy.

With enough paper trading, you may in fact gain control over your emotions and be able to keep them in check during actual trading. Thus, paper trading serves like mind training!

### 3. Gives you adequate practice and confidence before deployment

Paper trading gives you the much-needed experience you need before you actually start trading with your hard-earned money.

This prepares you thoroughly before you deploy your strategies. It also gives you enough room to make mistakes and helps develop confidence to trade in the live markets.

### 4. Boosts creativity to try out new strategies

You may have come up with an experimental strategy that may be hard to implement considering that you have never tried it before.

However, with paper trading, you can literally simulate any strategy under your belt. This particularly helps when you do not have any statistics on the strategy’s performance.

Paper trading is not just for beginners but also for experienced traders who have lost touch with the market. Every trader goes through periods of losses, which can affect their confidence. Paper-testing can be a lot of help with regaining your control on emotions and your confidence before you dive back into action.

While earlier, traders would test strategies on an actual paper, today, a lot of platforms offer simulated trading. PHI 1 offers a superior simulation experience that can help you paper-test your strategies before you get into the real deal.

All you need to do is create and save your strategy on PHI 1, enter the strategy you want to use for paper trading, choose an instrument, set testing parameters and amount, and add risk controls. You’re all set to drive a trading simulation using PHI 1.

Also, PHI 1 enables limitless creation of strategies with its form-based and multi-symbol strategy creator, and standard as well as calendar risk controls, taking your algo trading to the next level.

PHI 1 aims to set the trader free from the daily mundane tasks by automating them, so traders can focus on exploring opportunities in the stock market.

## 5 common mistakes every trader makes and how you can avoid them

### It’s ok to be wrong; it’s unforgivable to stay wrong.” – Martin Zweig

Contrary to what many beginners believe, trading is not a way to make ‘easy money.’ While a lot of glamour has been associated with the trading world, it is only those who research, gain knowledge, and learn from their mistakes that truly flourish as traders.

### 1. Not having a strategy

Failing to plan essentially translates to planning to fail. Whenever you decide to trade in the market, always back it up with a solid strategy.

Jumping into execution without a plan will catch you like a deer in headlights amid an adverse market movement.

How to avoid:

Make sure that you at least determine your entry and exit points and put risk controls in place.

Further, run a paper test in various conditions to understand the probability of your trades winning in various market scenarios.

Also, you may go through your track record at the end of each month to learn from your trades. PHI 1 allows not only the creation of strategies with its multi-symbol strategy creator, it also enables backtesting and bulk testing for multiple market scenarios.

### 2. Failing to cut losses

Okay, you got into a trade and it did not go as you expected. So, you keep hoping against hope that it will work out?

How to avoid:

If you hit the stop loss, it is a signal that you must take the loss and exit the trade. Basically, it is all about sticking to your plan.

With PHI 1, you can not only set standard risk controls but also various calendar risk controls, which takes substantial stress off you while you trade.

### 3. Getting emotional

One of the primary mistakes traders make is getting too emotional about their money and trading skills. Many traders expect to consistently earn profits from their trades and do not accept that trading is a mix of good and bad days.

Further, if a trade goes against them, they doubt their knowledge and research skills. If a trade works in their favour, they get overconfident, indulging in reckless trading.

How to avoid:

While trading, ensure that you steer clear of your emotions and biases. Automated or algo trading can solve this problem.

Once you devise a strategy and set it in motion, the algo trading platform takes care of your trades. You can now trade without the interference of your impulses.

### 4. Over-leveraging

Leverage can be a powerful weapon because it allows one to trade in sizes that are larger than their capital. Thus, you can borrow money to enter a transaction that is much bigger than your cash balance.

However, misusing leverage or over-leveraging is the single biggest reason for traders to shut shop. Leverage trading or margin trading can be addictive, however, remember that leveraging comes with a price.

Further, with the size of trade being huge, the potential for loss also becomes huge on leveraged money and can lead to stress and impulsive decisions.

How to avoid:

Be cautious while using leverage. Use only if your strategy is tested and has delivered consistently.

Also, ensure you stick to your trading plan with a strict stop loss. Remember, leverage is a double-edged sword. It can amplify profits but can also maximize losses.

Common mistake traders make is concentrating their entire trading capital into one stock or security or taking similar positions in highly correlated assets.

This can literally wipe off your entire capital with an adverse movement in that asset.

READ :   How PHI 1’s Multi-Symbol Strategy Creator helps you spot unlimited trade opportunities

How to avoid:

It is always wise to diversify your trades among multiple stocks, instruments, asset classes, and even markets. This way, a loss in one position can be offset by another, especially if your positions or assets have low correlation.

Have you committed any of these mistakes? Don’t fret! These mistakes are ‘common.’ In fact, every trader has made these mistakes during their trading journey. However, it is essential that one learns from these mistakes in order to move forward in their trading career.

Whether you are a novice or experienced trader, PHI 1 can take your trading up a notch with its many features. Still doubt it?

## Why risk control is important in trading?

“Throughout my financial career, I have continually witnessed examples of other people that I have known being ruined by a failure to respect risk. If you don’t take a hard look at risk, it will take you.” – Larry Hite

Then, what should you do? You must learn to manage your risk using risk controls. Risk controls are often underestimated. However, a trader who consistently uses them can manage losses and open herself to more opportunities for successful trades.

Risk control in trading refers to a plan-based trading strategy that focuses on identifying, evaluating, and preparing for any potential for loss. Risk represents the probability of loss when the market/ asset price moves in a direction opposite to our expectations.

For risk control in trading, one needs to keep in mind several aspects such as which financial instruments to trade in, time of entry and exit, where to set profit and loss limits, how to identify good opportunities, how to deal with markets moving against our position, how to keep emotions at bay and finally, how to stay on course with a plan.

### Here are some ways to execute risk controls and their importance:

It is common knowledge that planning can even win wars. The same concept applies to trading as well. Successful traders plan their trade before they trade.

Have a logical strategy with the stop-loss and take-profit limits chalked out. If you do not plan your trades, it is very likely that emotions will rule your trades and lead to losses.

### 2. Follow the one-percent rule

The one-percent rule is essentially a rule of thumb that says that you should never place over 1% of your trading capital or account in a single trade.

Thus, if you have Rs.1 lakh in your trading account, your position in any single trade should be less than Rs.10,000. This is an effective risk control strategy. However, many traders put as much as 2% too or even lower than 1%.

### 3. Set stop loss and take profit

As highlighted above, setting stop-loss and take-profit is an important part of your trading plan. Although it is mostly done via technical analysis, fundamental analysis also helps with timing.

One widely used indicator to set stop loss and take profit points is moving averages, given that they involve simple calculations and are also widely tracked by the market.

It makes sense to use longer-term moving averages for highly volatile stocks and also use fundamental events such as earnings, news announcements, etc. to account for the timing aspect.

Make sure you calculate your expected return. You may use the following formula: [(Probability of Gain) x (Take Profit % Gain)] + [(Probability of Loss) x (Stop-Loss % Loss)]

Ensure that you do not put all your eggs in the same basket. It means do not put all your capital in one trade or instrument.

Ensure you have a healthy mix of instruments to reduce your concentration risk to a particular asset class, sector, and even geography. Choosing less-correlated instruments is recommended while trading.

### 5. Consider hedging

Hedging is a strong risk management tool. It essentially involves taking the opposite position from your original position.

Here, if your primary position loses, the other position will still profit and make up for the loss.

What if your algorithmic trading platform itself comes with risk controls? It’s true!

PHI 1 comes with various types of Inbuilt Risk Controls that sets the trader free from the constant worry of losses. Unlike other algo trading platforms, PHI 1 not only offers standard risk control but also calendar-based risk controls.

Further, traders can create custom risk controls during strategy creation. Within calendar controls, traders can make use of day control, time control, week control, month control, and date control, which offers them the option of fine-tuning their trading strategy.

Along with superior risk control, PHI 1 offers an all-in-one trading solution so you can use your precious time exploring unique trading opportunities!

Automated or algorithmic trading is the process of automatically executing trades based on predefined rules by traders. Traders decide the entry and exit points as well as the strategy to be followed by the algo trading system into the system, which automatically executes trades based on this information.

Automated trading comprises 70% of the total trading volumes in the US and other developed markets currently. In India, nearly 46% of the total trades on NSE and 30% of those on BSE are algorithmically performed.

This number is growing even further as algorithmic trading gains more popularity. While algorithmic trading has several benefits in terms of convenience and efficiency to traders, the one that stands out is the ability to automate one’s trading strategy using the algo trading platform.

With algorithmic trading, you can also fully automate the signal generation and execution of a trading strategy. You no longer need to monitor stock prices or put in orders manually.

### 1. Create and execute multiple strategies simultaneously

While regular trading involves spotting opportunities manually, it leads to a loss of time and opportunities as the trader can only focus on a few things at once.

With algorithmic trading, a trader has the ability to spot multiple trade opportunities without the need for staying on the screen constantly. Even multiple strategies can be executed at the same time.

All the trader has to do is input the strategy codes and punch in conditions related to trade entry and exit points, stop loss condition, etc.

The strategies will then be deployed by the software, enabling the trader make the most of tradeable opportunities.

### 2. Backtest and Bulktest under many conditions

Few software such as PHI 1 even offer bulk backtesting, which aids in identifying scenarios where your strategy may underperform. Additionally, PHI 1 has a scenario grading feature wherein your strategy is graded or scored in multiple market conditions, further minimizing risk.

### 3. Save time by saving your strategies in one place

Traders can save a tremendous amount of time by entering strategy codes as well as instructions such as stop loss, take profit, exit point, entry point, and saving these onto the algo trading software.

This allows the trader to focus on monitoring trades and markets more conveniently. Since algo trading software acts super quick compared to humans, execution is also quick, minus the intervention of human emotions.

Thus, you can make the most of quickly moving/highly volatile market scenarios.

Automated strategies help take care of multiple types of trades as algo software can monitor many markets compared to humans. This enables trade diversification, further cutting down risk.

With multiple automated strategies amid multiple markets, the software can spot opportunities across all markets that it has been instructed to monitor. This protects traders from the concentration risk of trading in a single or very few markets.

### 5. Eliminate any room for error in execution

When you automate your strategy, there is no room for error in your trades. The algo trading platform will work exactly as it has been instructed. This frees the trader to do more important research-oriented tasks rather than sitting in front of the screen all day trying to spot opportunities.

Automated trading strategies also keep at bay any biases traders may have, as it goes exactly as it should in a predefined manner, whatever the market situation.

Further, it enables the trader to simplify strategies as the trader has to break them down so as to program them. This helps traders get a detailed glimpse into their strategies. Many a time, this also makes traders simplify otherwise complicated strategies.

PHI 1’s advanced strategy creator allows traders to create, test, and analyze any automated strategy limitlessly. In addition, its Multi-Symbol Strategy Creator aids in creating over 125 types of strategies.

PHI 1 also provides robust support to create automated strategies through its knowledge section and webinars.

PHI 1 provides all the benefits of algorithmic trading and more–the biggest advantage being that it sets the trader free from the daily, time-consuming tasks by providing all trading tools from screening to execution–at one place. PHI 1 is, therefore, your one-stop solution to automated trading.

## Statistical Arbitrage Presentation by PHI 1 at Finbridge Algorithm Conference (Nov 2020)

Sharing a copy of our Statistical Arbitrage Presentation last week at Finbridge Algorithm Conference

Speaker: Gaurav Mahajan

• The Math/ Logic behind the Strategy.
• How to implement it
• Selection of Securities to run
• Risk/Reward Characteristics of the Strategy.
• How to Construct a Long/Short Hedged Portfolio.

A trading strategy is a plan aimed at generating profits by taking a long or short position. Essentially, a trading strategy comprises a set of pre-defined rules followed by traders to make trading decisions.

A good trading strategy is one that factors in risk tolerance, specific objectives, time horizon, and even tax implications.

A well-researched and -executed trading strategy can help traders achieve profitable returns. You can also fully automate the signal generation and execution of a trading strategy via an algorithmic trading strategy.

With an automated trading strategy, the trader no longer has to monitor stock prices or punch in orders manually. Programming is often an important skill in developing algorithmic strategies.

## Here’s how you can automate your trading strategy using PHI 1:

### 1. Hypothesis Formation/Strategy Formation

Hypothesis formation is all about what you think about the market. It is primarily an educated guess (based on confidence levels) about market behavior and the factors causing this behavior.

Thus, if you think the market is trending lower, you may want to short an asset and if you think the market is trending higher, you may want to go long on the asset—all this is based on statistical analysis.

To validate the hypothesis/assumption, you will need to perform hypothesis testing—a statistical method to test the claim, idea, or guess. In hypothesis testing, one needs to analyze the behaviour of samples (a small representative set) to draw insights about the entire population (a larger set).

Example: You may want to invest in stock only if it has given average returns of 15% annually. You check that for the past 5 years, the stock has given average returns of 18% with a standard deviation of 3%. Would you still invest in this stock? Hypothesis testing helps in such decision-making.

The most common steps used in hypothesis formation are to define the hypothesis, set the criteria, calculate the statistic, and reach a conclusion

Once you have decided on your strategy, you need to code the logic of your strategy onto a platform. This would include instructions related to trade entry and exit points, decisions on take profit, putting in the stop loss condition, etc.

Many other factors such as trade size, trading capital also need to be factored in, basis your risk profile. PHI 1’s advanced strategy creator allows you to create, test, and analyze any strategy without restrictions, even if it’s an arbitrary one.

Further, with its Multi-Symbol Strategy Creator, you can create all possible quant strategies, be it Mean Reversion, Momentum, Day Trading, Multi-Frequency, Arbitrage Strategies, Pairs Trading, Seasonality/Calendar based Strategies, Forward Curve, and much more.

More than 125 technical indicators are already built-in and ready to use with a single line of code, and the user can define any new price- and volume-based indicator.

Moreover, PHI 1’s team is always there for any support you may need with strategy creation on our platform through interesting webinars, insightful content, and our comprehensive learn section.

You can start creating your strategies on PHI 1 without any coding knowledge. If you want to build an advanced one like Quant or Price-Action based, then you need to have basic knowledge of Python syntax. You can start right away with these trading strategies on PHI 1.

### 3 Back-testing and Optimization

Back-testing is an essential tool to analyze the strategies you create based on historical data. This is because if the results of backtesting meet your criteria, it elevates your confidence levels while trading in the live market.

And if the results are less favorable, it’s a loss averted! You can always modify, adjust, and optimize your strategy to achieve a more desirable result.

Unlike most tools available in the market, PHI 1 enables bulk backtesting, an essential feature to identify scenarios where your strategy may underperform.

Further, PHI 1 offers scenario grading wherein you can get a score on your strategies in multiple market scenarios such as market crash and volatility, further adding to your confidence.

### 4. Simulator Testing

Now that you’re done with back-testing and optimizing your strategy, it is recommended that you test your strategy in a simulated (virtual trading) environment.

This can give you a crystal clear picture of how your strategy will perform in the live market. You can identify any bugs or edge conditions that might be present in the strategy code and refine your code accordingly.

PHI 1 offers the ability to simulate trades or perform forward-testing so you can gain the confidence of trading with your strategies in the live market!

PHI 1 empowers a trader right from brainstorming a trading hypothesis to back- and forward-testing it. But wait, there’s more, once you’re ready to trade in the live market, PHI 1 helps you seamlessly deploy and closely monitor your trades too!

Moreover, with PHI 1’s multi-broker integration, you don’t have to be limited to a specific broker. The choice is yours. Even if one broker is having a downtime, you never miss a trade again! Multiple brokers also help you get the best rates.

PHI 1 assists traders throughout their trading strategy creation and execution journey.

Along with its unique features such as custom screeners and advanced risk controls, you are set free from the mundane, daily tasks that would otherwise cost you a lot of time and money. PHI 1 is, therefore, your complete solution to automated trading.

## Strategies from PHI 1’s Webinar – Creating a MACD Strategy on PHI 1 (6th November 2020)

(Disclaimer: These strategies were showcased as part of our educational webinar – Creating a MACD Strategy on PHI 1 (6th November 2020). The purpose of sharing these strategies is purely educational. Please do not consider these for investment purpose)

1. MACD Strategy

Original Source: View Video

You will find the entry and exit condition in this video which you can create using PHI 1’s Strategy Creator in the Form Code (No coding required)

2. Guppy Multiple Moving Averages Strategy

Original Source: View Video

Since this one is a complex strategy, we have created this one using PHI 1’s Strategy Creator in the Code Mode.

Here’s the code for the same. You can try it out for free

INIT

# short term moving averages

self.sema1 = EMA(close,period=3)

self.sema2 = EMA(close,period=5)

self.sema3 = EMA(close,period=8)

self.sema4 = EMA(close,period=10)

self.sema5 = EMA(close,period=12)

self.sema6 = EMA(close,period=15)

# long term moving averages

self.lema1 = EMA(close,period=30)

self.lema2 = EMA(close,period=35)

self.lema3 = EMA(close,period=40)

self.lema4 = EMA(close,period=45)

self.lema5 = EMA(close,period=50)

self.lema6 = EMA(close,period=60)

# confirmation long term moving average

self.conf_lema = SMA(close,period=200)

# ATR

self.atr = ATR()

————————————
STEP

# entry

if self.position.size == 0:

list_sema = [self.sema1[0], self.sema2[0], self.sema3[0], self.sema4[0], self.sema5[0], self.sema6[0]]

list_lema = [self.lema1[0], self.lema2[0], self.lema3[0], self.lema4[0], self.lema5[0], self.lema6[0]]

if min(list_sema) > max(list_lema) and low[0] > self.conf_lema[0] and min(list_sema) > self.conf_lema[0] and min(list_lema) > self.conf_lema[0]:

# buy_bracket(limitprice=close[0] + self.atr*8, price=close[0], stopprice=close[0] – self.atr*4)

#exit

if self.position.size > 0:

list_sema = [self.sema1[0], self.sema2[0], self.sema3[0], self.sema4[0], self.sema5[0], self.sema6[0]]

list_lema = [self.lema1[0], self.lema2[0], self.lema3[0], self.lema4[0], self.lema5[0], self.lema6[0]]

if min(list_sema) <= max(list_lema) or low[0] <= self.conf_lema[0]:

square_off()

READ :   7 reasons PHI 1 is a unique algo trading platform

### How to use this code on PHI 1

1. Copy & Paste the Init code in the – Enter initialize code here section
2. Copy & Paste the Step code in the – Enter step code here section
3. Click Run And Save

If you need any help or have any questions, then please schedule a demo session with us and we will help you out.