Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
How to Add Drag and Drop in React using React Beautiful DnD
In this article, we will see how to drag and drop elements in a list. Drag and drop can be a useful feature when you are making a chat, dating, messenger, or any other similar type of web apps.ExampleFirst install the package "react-beautiful-dnd" −npm i --save react-beautiful-dndThis library will be used to add drag-and-droppable elements inside a list.Add the following lines of code in App.js −import { DragDropContext, Droppable, Draggable } from "reactbeautiful-dnd"; import React, { useState } from "react"; import "./App.css"; const finalSpaceCharacters = [ { id: "gary", name: "Gary Goodspeed", ...
Read MoreAutocomplete and suggestion in ReactJS
In this article, we will learn how make an autocomplete and suggestion box in React JS. Autocomplete is one of the basic features that every website has, however implementing it in a React website is very complex and problematic. Here, we will see an easy implementation of autocomplete in React JS.First create a React project −npx create-react-app tutorialpurposeNow go to the project directory −cd tutorialpurposeExampleFirst download a package −npm install --save downshiftThis library is used to add suggestion list for searchbox and the list will be written inside an array.You just copy the following code and change its style and ...
Read MoreAuto-scrolling animation in React.js using react-spring
In this article, we will see how to create a scroll to top animation in React JS using the react-spring package.First create a react project −npx create-react-app tutorialpurposeNow go to the project directory −cd tutorialpurposeExampleInstall the react-spring package −npm install react-springreact-spring is used to add Spring concept based animations to our website.Next, Add the following lines of code in App.js −import React, {useState} from 'react' import { useSpring, animated } from 'react-spring' export default function App(){ const [flip, set] = useState(false) const words = ['We', 'came.', 'We', 'saw.', 'We', 'hold', 'it s', ...
Read MoreAdding Lottie animation in React JS
Lottie is an open source animation file format that’s tiny, high quality, interactive, and can be manipulated at runtime. Let us learn how to implement Lottie animation in React.js. Lottie animations are mainly used for loader screen or as a start screen. It is written and implemented in JSON format in our React projects.ExampleGo to the official Lottie animation website and download Lottie JSON.Link to animation the I am going to use − https://lottiefiles.com/74546-character-02#/Name the JSON file "myloader.json" and keep it at the same level as App.js.Now install the react-lottie package −npm i --save react-lottieLottie library will be used to add ...
Read MoreCreating 3D Text using React-three-fiber
In this article, we will see how to create a 3D text using react-threefiber. We will first download the font of JSON and then we will add it in our Text Geometry object. We will add orbit control to it which will allow moving the text on the screen and view the 3D text properly. So, let's get started.ExampleFirst, download important libraries −npm i --save @react-three/fiber threeThis library react-three/fiber will be used to add webGL renderer to the website and to connect threejs and React.Now install a typeface font JSON and put it inside “src” folder. You can download a ...
Read MoreWhat is a market portfolio?
A market portfolio is an assumed or virtual portfolio where every available type of asset is included in proportion to its market value. An investment portfolio is a group of investments that are owned and managed by one individual or organization. A typical investment portfolio may include numerous types of assets, but usually, it does not include all asset types. A market portfolio, however, virtually includes every asset that is available in the market.How is the market portfolio managed?A market portfolio is created to have the right mix of asset classes to maximize the returns from the investment and to ...
Read MoreAssumptions of Capital Asset Pricing Model (CAPM)
The Capital Asset Pricing Model (CAPM) has some assumptions upon which it is built. Here are the five most influential assumptions of CAPM −The investors are risk-averseCAPM deals with risk-averse investors who do not want to take the risk, yet want to earn the most from their portfolios. Diversification is needed to provide these investors more returns.Choice on the basis of risks and returnsCAPM states that Investors make investment decisions based on risk and return. The return and risk are calculated by the variance and the mean of the portfolio. CAPM reinstates that rational investors discard their diversifiable risks or ...
Read MoreHow does the portfolio risk depend on the correlation between assets?
Portfolio Risk and ReturnThe general standard deviation (SD) of a portfolio is related to −The weighted mean average of each individual variance, andThe generally weighted covariances between all assets in the portfolio of investment.When a new asset is added to a large basket of portfolios with many assets, the new asset alters the portfolio's SD in two ways. It affects −The new asset's own variance, andThe covariance between the new asset and each of the other assets in the portfolio.The net effect of the numerous covariances will be more important than the effect of the asset's own variance. The more ...
Read MoreHow is the standard deviation and variance of a two-asset portfolio calculated?
Portfolio standard deviation is the general standard deviation of a portfolio of investments of more than one asset. It shows the total risk of the portfolio and is important data in the calculation of the Sharpe ratio.It is a well-known principle of finance that "more the diversification, less is the risk." It is true unless there is a perfect and well-established correlation between the returns on the portfolio investments. To achieve the highest benefits of diversification, the standard deviation of a portfolio of investments should be lower than the general weighted average of each standard deviation of the individual investments.In ...
Read MoreHow is the slope of a capital market line (Sharpe Ratio) defined?
The slope of a capital market line of a portfolio is its Sharpe Ratio. We know that the greater the returns of a portfolio, the greater the risk. The optimal and the best portfolio is often described as the one that earns the maximum return taking the least amount of risk.One method used by professionals to increase returns taking minimal risks is the eponymous "Sharpe Ratio". The Sharpe ratio is a calculation of risk-adjusted returns of how good is the investment return vis-a-vis the amount of risk taken. An increased Sharpe ratio for an investment means a better risk-adjusted return.How ...
Read More