Tuesday, February 24, 2009

Finance - Securities Lending

Hi,

In this post I’m going to explain few concepts of Securities Lending. Most of us might not be familiar with “Securities Lending”, first let me tell you what securities are.

What is Securities Lending?

Securities lending is an investment strategy in which investors make short-term loans of their securities to generate incremental revenues from their portfolios. The securities lent typically include a broad array of equities as well as fixed income securities, including government and agency securities and corporate bonds. Small cap stocks, growth stocks, global equities and government bonds are generally among the most attractive.

Why lend securities?

  • Increase overall performance
  • Offset expenses associated with maintaining the portfolio
  • Maximize opportunities to leverage their portfolio
  • Finance fund-specific projects
  • Retain ownership benefits (except right to vote)

Why borrow securities?

Borrowers are usually broker-dealers with proprietary trading desks and prime brokerage units supporting hedge fund activities. Generally, they borrow securities to:

  • Facilitate sophisticated trading and arbitrage strategies, and to cover shorts and prevent fails
  • Engage in strategies such as risk arbitrage and pairs trading
  • Participate in dividend arbitrage and other financing activities
  • Finance inventory and manage balance sheets
  • Act as an intermediary — as with agent banks and prime brokerage

What type of collateral can be used?

Typically, collateral consists of:

  • Cash (USD, GBP and Euro primarily)
  • U.S. government or agency securities or G1O debt and Supernationals
  • Other U.S. and/or foreign securities as allowed by the lending institution
  • Letters of credit

How is revenue generated?

A lender earns a return from these transactions in several different ways, depending upon the type of collateral posted by the borrower against securities loaned.

  • Cash as collateral — the cash is reinvested into short-term money market instruments. In return, the lender pays the borrower a rate of interest on the cash collateral called the “rebate” rate. The lender then earns the spread between the investment rate of the short-term vehicle and the rebate rate.
  • Securities or a letter of credit as collateral — the borrower pays the lender a set fee in exchange for the borrowed securities.

In an exclusive securities lending arrangement, also referred to as a “principal arrangement”, the lender earns a fee from the borrower for the exclusive right to borrow from a portfolio plus the spread between the reinvestment rate of cash and the rebate paid under a cash collateral scenario.

What determines the potential revenue?

In a traditional agency program, fees are negotiated on a trade-by-trade basis. At eSecLending, price is effectively established for portfolios, or segments thereof, through a competitive auction process. Revenue can be affected by many factors. These include:

  • Availability of security in open market
  • Value of portfolio
  • Asset class
  • Duration of loan
  • Size of individual holdings
  • Type of investment strategy
  • Market / geographic diversification
  • Dividend yield of security
  • Tax status of underlying lender

Who arranges the transactions?

Market facilitators arrange and facilitate securities lending transactions. These include custodial banks, third party lending agents, broker-dealers acting as principals and eSecLending, with its unique role as a securities lending manager.

Here is how each type of operates:

  • Custodial agent lenders act as an intermediary lending agent in a “best efforts,” non-guaranteed program, lending individual securities for a percentage split of the revenues generated.
  • Third party agent lenders facilitate programs similar to the custodial structure above; however, they act as a specialist lending agent and do not custody the securities.
  • Broker-dealers as principal borrowers (exclusive principal deal) accept a guaranteed fee for the exclusive right to borrow from a portfolio for a specified term.
  • Securities lending managers (such as eSecLending) arrange exclusive principal deals, as described above, via a competitive auction process with multiple borrowers, rather than a traditional process with just one borrower

What are the risks?

When properly planned and executed, securities lending is a low-risk investment strategy. Since all investment activities involve some risks, lenders should consider the following with respect to their securities lending activities:

RISK

CONTROLS

Counter Party Risk

Borrower defaults or is insolvent, failing to re-deliver the borrowed securities.

· Capital and rating requirements, extensive ingoing credit reviews and VaR-based credit limits.

· Daily collateral mark-to-market.

· Indemnification insurance provided by third party in the event of borrower default.

Cash Collateral reinvestment Risk

Investment default, credit risk and liquidity or duration mismatch in the cash reinvestment portfolio.

· Monitor and manage average-weighted life, credit quality, sector allocation, duration and liquidity.

· Establish conservative reinvestment guidelines

· Manage unbundling of “core” cash management

Operational Risk

Processing mistakes and errors in the administering lending programs.

· Daily reconciliation between program participants

· Process and procedures in a controlled environment

· Routine reporting and compliance monitoring

Legal/Contractual Risk

Compliance with program guidelines.

· Standardized documentation

· Audit/compliance reporting and oversight

· Premier industry experts as external legal counsel.

Thanks,

Paresh Bhole

Tuesday, December 30, 2008

ADO .Net Namespaces, Providers and use of XML

ADO Data Provider:


A data provider is a set of ADO.NET classes that allows you to access a specific database, execute SQL commands, and retrieve data. Essentially, a data provider is a bridge between your application and a data source.


The classes that make up a data provider include the following:


Connection: You use this object to establish a connection to a data source.
Command: You use this object to execute SQL commands and stored procedures.
DataReader: This object provides fast read-only, forward-only access to the data retrieved from a query.
DataAdapter: This object performs two tasks. First, you can use it to fill a DataSet (a disconnected collection of tables and relationships) with information extracted from a data source. Second, you can use it to apply changes to a data source, according to the modifications you’ve made in a DataSet.



XML and ADO.NET:


ADO.NET leverages the power of XML to provide disconnected access to data. ADO.NET was designed hand-in-hand with the XML classes in the .NET Framework — both are components of a single architecture.


ADO.NET and the XML classes in the .NET Framework converge in the DataSet object.

The DataSet can be populated with data from an XML source, whether it is a file or an XML stream.

The DataSet can be written as World Wide Web Consortium (W3C) compliant XML, including its schema as XML Schema definition language (XSD) schema, regardless of the source of the data in the DataSet.


Because the native serialization format of the DataSet is XML, it is an excellent medium for moving data between tiers making the DataSet an optimal choice for remoting data and schema context to and from an XML Web service.



ADO Namespaces:


Below are few namespaces those are used in ADO .Net for making connections to database, playing with different databases e.g. SQL, Oracle.


System.Data: Contains the key data container classes that model columns, relations, tables, datasets, rows, views, and constraints. In addition, contains the key interfaces that are implemented by the connection-based data objects.


System.Data.Common: Contains base, mostly abstract classes that implement some of the interfaces from System.Data and define the core ADO.NET functionality. Data providers inherit from these classes to create their own specialized versions.


System.Data.OleDb: Contains the classes used to connect to an OLE DB provider, including OleDbCommand, OleDbConnection, and OleDbDataAdapter. These classes support most OLE DB providers but not those that require OLE DB version 2.5 interfaces.


System.Data.SqlClient: Contains the classes you use to connect to a Microsoft SQL Server database, including SqlDbCommand, SqlDbConnection, and SqlDBDataAdapter. These classes are optimized to use the TDS interface to SQL Server.


System.Data.OracleClient: Contains the classes required to connect to an Oracle database (version 8.1.7 or later), including OracleCommand, OracleConnection, and OracleDataAdapter. These classes are using the optimized Oracle Call Interface (OCI).


System.Data.Odbc: Contains the classes required to connect to most ODBC drivers. These classes include OdbcCommand, OdbcConnection, and OdbcDataAdapter. ODBC drivers are included for all kinds of data sources and are configured through the Data Sources icon in the Control Panel.


System.Data.SqlTypes: Contains structures that match the native data types in SQL Server. These classes aren’t required but provide an alternative to using standard .NET data types, which require automatic conversion.



Thanks & Regards,


Paresh Bhole

Thursday, November 27, 2008

Compatibility with IE-8

Hi,

This is regarding the “compatibility with IE-8”. We have two different ways to configure IE 8 to emulate/render the web site like IE 7 without any GUI & JavaScript issues.


First one using IE 8 browsers provides way to open web site exactly similar to IE 7:

To confirm that browsing in Internet Explorer 8 Standards mode is the cause of an issue, follow these steps:

  1. Open Internet Explorer 8 Beta 1.

    Note If you do not have Internet Explorer 8 Beta 1 installed, you can download it from the following Microsoft Web site:

http://www.microsoft.com/windows/products/winfamily/ie/ie8/getitnow.mspx (http://www.microsoft.com/windows/products/winfamily/ie/ie8/getitnow.mspx)

  1. Click Emulate IE 7 on the menu bar, and then close the Internet Explorer browser window.
  2. Open Internet Explorer 8 Beta 1, verify that the Emulate IE 7 button is depressed, and then visit the affected Web site.
  3. Make sure that the affected Web site is now displayed correctly.
  4. Click Emulate IE 7 to disable Internet Explorer 7 emulation, and then close the Internet Explorer browser window.
  5. Open Internet Explorer 8 Beta 1, and then visit the affected Web site to confirm that you experience the issues again after disabling Internet Explorer 7 emulation.



Second way is to use Meta-Tag:


You can use one of the following options to force Internet Explorer 8 to render Web pages like Internet Explorer 7:


· Per-site basis



Site owners and administrators can include the following custom HTTP header to force Internet Explorer 8 to render Web pages like Internet Explorer 7:


X-UA-Compatible: IE=EmulateIE7



To add a custom HTTP response header at the Web site level in Internet Information Services 7 on a Windows Server 2008-based computer, follow these steps:

    1. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
    2. Under Connections, double-click the server that you want, and then double-click Sites.
    3. Click the Web site where you want to add the custom HTTP response header.
    4. Under Web site name Home, double-click HTTP Response Headers in the IIS section.

      Note In this step, Web site name is the name of the Web site.
    5. Under Actions, click Add.
    6. In the Name box, type X-UA-Compatible.
    7. In the Value box, type IE=EmulateIE7.
    8. Click OK.

To add a custom HTTP response header at the Web site level in Internet Information Services 6 and earlier versions, follow these steps:

    1. Click Start, click Run, type inetmgr.exe, and then click OK.
    2. Expand the server that you want, and then expand Web Sites.
    3. Right-click the Web site that you want, and then click Properties.
    4. Under Custom HTTP headers, click Add.
    5. In the Custom header name box, type X-UA-Compatible.
    6. In the Custom header value box, type IE=EmulateIE7.
    7. Click OK two times.


· Per-page basis



Site owners and administrators can include the following special HTML tag after the tag on the page:



The following example shows use of this Internet Explorer 7 compatibility mode tag on a per-page basis:

  
  
  My Web Page
  

Content goes here.




· Testing your site with the meta-tag



To verify you have installed the tag correctly on your site, follow these steps:

    1. If you do not have Internet Explorer 8 Beta 1 installed, you can download it from the following Microsoft Web site:

http://www.microsoft.com/windows/products/winfamily/ie/ie8/getitnow.mspx (http://www.microsoft.com/windows/products/winfamily/ie/ie8/getitnow.mspx)

    1. Download the Internet Explorer 8 Beta 1 security update that is described in Microsoft Knowledge Base article 951804. This update adds support for the IE=EmulateIE7 tag. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

951804 (http://support.microsoft.com/kb/951804/ ) MS08-031: Security update for Internet Explorer 8 Beta 1


For more information about the EmulateIE7 tag, visit the IEBlog Web site:

http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx (http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx)

    1. Browse your site in Internet Explorer 8 Standards mode and verify you do not encounter issues described in the "Symptoms" section.


Thanks,

Paresh B

Wednesday, November 19, 2008

Image Editor



Hi All,


Lots of time we used to develop image resizing code (creating thumbnail or resizing image to required height & width), but keeps on forgetting the code, even happen with me too. This code is not actually written by me, but posted here for future references.


This code is posted to keep the code for resizing & sacing an image uploaded.


Resize Image:


Below method shows the code to resize an uploaded image.


Parameters:

  1. (Bitmap imgToResize)[ System.Drawing.Image] – This is an actual image uploaded or provided for resizing.
  2. (Size size) – This is the size of the new resized image.


Code:

  1. The next step is to actually figure out what the size of the resized image should be. The first step is to calculate the percentages of the new size compared to the original. Next we need to decide which percentage is smaller because this is the percent of the original image we will use for both height and width. And now we calculate the number of height and width pixels for the destination image.
  2. The final thing to do is create the bitmap (System.Drawing.Bitmap) which we will draw the resized image on using a Graphics (System.Drawing.Graphics) object. I also set the interpolation mode, which is the algorithm used to resize the image. I prefer HighQualityBicubic, which from my testing seems to return the highest quality results. And just to clean up a little I dispose the Graphics object.


public static Bitmap ResizeImage(Bitmap imgToResize, Size size)

{

int sourceWidth = imgToResize.Width;

int sourceHeight = imgToResize.Height;

float nPercent = 0;

float nPercentW = 0;

float nPercentH = 0;


nPercentW = ((float)size.Width / (float)sourceWidth);

nPercentH = ((float)size.Height / (float)sourceHeight);


if (nPercentH <>

nPercent = nPercentH;

else

nPercent = nPercentW;


int destWidth = (int)(sourceWidth * nPercent);

int destHeight = (int)(sourceHeight * nPercent);


Bitmap b = new Bitmap(destWidth, destHeight);

Graphics g = Graphics.FromImage((Image)b);


g.InterpolationMode = InterpolationMode.HighQualityBicubic;

g.DrawImage(imgToResize, 0, 0, destWidth, destHeight);

g.Dispose();

return (Bitmap)b;

}


Save Image Code:


Below method will save the resized image to the given path.

  1. (string path) – Mapped path for saving image with Image Name.
  2. (Bitmap img) [System.Drawing.Image] – This is an actual image.
  3. (long quality) – This parameter used like number of pixels.


public static void SaveJpeg(string path, Bitmap img, long quality)

{

// Encoder parameter for image quality

EncoderParameter qualityParam =

new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, (long)quality);

// Jpeg image codec

ImageCodecInfo jpegCodec = getEncoderInfo("image/jpeg");


if (jpegCodec == null)

return;


EncoderParameters encoderParams = new EncoderParameters(1);

encoderParams.Param[0] = qualityParam;

img.Save(path, jpegCodec, encoderParams);

}



private static ImageCodecInfo getEncoderInfo(string mimeType)

{

// Get image codecs for all image formats

ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();

// Find the correct image codec


for (int i = 0; i <> if (codecs[i].MimeType == mimeType)

return codecs[i];

return null;

}



Thanks,

Paresh Bhole

Hello

Thanks for checking out my post...

... Paresh Bhole