Options are a great way to make money from short-term sales. However, one must be aware of the market and make a resilient strategy to gain profits from the options. There are definitely some risks while investing in options, but they can be minimized to a large extent. A "protective put" is a special version of the put option to let the investors earn profit without having to lose money too badly if the strategy goes wrong.What is a protective put?A protective put is an investment strategy that is designed to help an investor limit the losses in case of ... Read More
If the issuers of the underlying security of an option call early, the investors lose some money. A call premium is a compensation paid by the issuers to make up for the gap or loss suffered by the option holders. The premium is meant to balance the risk option owners face while the underlying is exercised earlier than its maturity period.Call Premium – What is it?Some securities, such as bonds have the luxury to be called early. If such securities are kept as the underlying in an option, they may be called earlier than the deadline of the security. This ... Read More
A covered call is an options strategy for which one needs to hold a long position in the underlying asset, such as a stock while selling the call option on the underlying asset. By selling the call option, the investor generally locks the price in of the asset, to enjoy a short-term profit. Moreover, the investor also gets a slight cushioning from a future decline in stock prices.When should you use the covered call option strategy?The covered call works well when the market is neutral or moderately bullish. In such circumstances, the future upside potential of the stock is limited. ... Read More
Suppose we have a string s, we have to find the maximum number of unique substrings that the given string can be split into. We can split string s into any list of non-empty substrings such that the concatenation of the substrings forms the original string. But we must split the substrings such that all of them are same.So, if the input is like s = "pqpqrrr", then the output will be 5 because we can split it like ['p', 'q', 'pq', 'r', 'rr']. If we split like ['p', 'q', 'p', 'q', 'r', 'rr'] is not valid because here 'p' ... Read More
Suppose we have an array nums and another value p, we remove the smallest subarray (not the whole array) such that the sum of the remaining values is divisible by p. We have to find the length of the smallest subarray that we need to remove, if there is no such subarray then return -1.So, if the input is like nums = [8, 2, 6, 5, 3] p = 7, then the output will be 1 because if we remove 3, then total sum will be 21 and that is divisible by 7.To solve this, we will follow these steps ... Read More
Suppose we have an array nums, and another array called requests where requests[i] = [start_i, end_i], this represents the ith request asks for the sum of nums[start_i] + nums[start_i+1] + ... + nums[end_i-1] + nums[end_i]. We have to find the maximum total sum of all requests among all permutations of nums. The answer may be very large, so return it modulo 10^9+7.So, if the input is like nums = [10, 20, 30, 40, 50] requests = [[1, 3], [0, 1]], then the output will be 190, because if we arrange like [30, 50, 40, 20, 10] we get: from requests[0] ... Read More
The classification of a security risk into "diversifiable" and "non-diversifiable" risks has come up from the portfolio approach of capital investment. It has culminated in the well-known and popular Capital Asset Pricing Model (CAPM), developed by Sharpe, Lintner, and others. According to this framework, the "diversifiable risk" is the risk that can be eliminated by diversification, while "non-diversifiable risks" are the risks that cannot be diversified away. Many investors define the two types of risks as two complementary components of the standard deviation (SD) of a security's rate of return.Diversifiable RiskDiversifiable risk is also called as "unsystematic risk". These risks ... Read More
Suppose we have an array called points with some points in the form (x, y). Now the cost of connecting two points (xi, yi) and (xj, yj) is the Manhattan distance between them, the formula is |xi - xj| + |yi - yj|. We have to find the minimum cost to make all points connected.So, if the input is like points = [(0, 0), (3, 3), (2, 10), (6, 3), (8, 0)], then the output will be 22 becauseso here total distance is (6+5+3+8) = 22.To solve this, we will follow these steps −points_set := a new set holding numbers ... Read More
Suppose we have a list of preferences for n(even) different friends. For each person i, the preferences[i] holds a list of friends sorted in the order of preference. So, a friend earlier in the list is more preferred than a friend later in the list. The friends in each list are numbered by integers from 0 to n-1. All of the friends are divided into different pairs. where pairs[i] = [xi, yi] represents xi is paired with yi and/or yi is paired with xi. But a friend x is unhappy if x is paired with y and there exists a ... Read More
If you create a contract and then file for bankruptcy, then the lender or creditor can file a "contingent claim" against your estate. A contingent claim that is based on some future event can be dealt with by the court in a number of ways.Certain Conditions Must be MetFor the contingent claim to file, some certain events must have taken place in the preceding phases. Because the future event is not guaranteed to happen or the creditors cannot say with 100% condition that the bankruptcy will take place, the claim may or may not become valid.Contingent claims are usually filed ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP